Markdown.pl: strip markup out of implicit anchors
commit94e07af1e7facdb8950c2a5eeddbfadc387a4ad5
authorKyle J. McKay <mackyle@gmail.com>
Tue, 16 Feb 2021 12:37:54 +0000 (16 05:37 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 16 Feb 2021 12:37:54 +0000 (16 05:37 -0700)
tree6346a6527f08c98dcddc95fee7fab861faff1bd3
parent857a411dc5e7d4d4c8aa09b56ea5916e8d88566f
Markdown.pl: strip markup out of implicit anchors

Each H1, H2, ... H6 generated courtesy of markdown markup has an
implicit anchor assigned based on the content of the element.

For example:

   # This is an _H1_ header

Strip any inline markup (in this case the '_'s) out before creating
the implicit anchor.  With this change, the text used to generate
the anchor for the above is just "This is an H1 header".

There are a couple of additional places where text that might have
inline markup gets turned into an identifier (implicit reference
links such as [thing][] or [thing] and wiki links without an
explicit link destination such as [[thing]]).  Perform the same
tag stripping for them too before trying to find the destination.

Many links that should have connected previously now do.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Markdown.pl