now works for inline links [fixes #1]