Elide Markdown when generating slug
This makes sure e.g. link URLs and image alt text don't get included in the slug.
Ref T329