loxsmoke / mddox

Markdown documentation generator tool
MIT License
37 stars 10 forks source link

Remove special characters from anchor links #8

Closed bert2 closed 4 years ago

bert2 commented 4 years ago

This fixes a bug where mddox generates broken anchor links for generic types in the type index.

Example

For the type OPPBuilder<TUserState, TTerm, TAfterString> mddox generates the following markdown:

[OPPBuilder\<TUserState, TTerm, TAfterString\> Class](#oppbuilder\<tuserstate,-tterm,-tafterstring\>-class)

The correct markdown it should generate is:

[OPPBuilder\<TUserState, TTerm, TAfterString\> Class](#oppbuildertuserstate-tterm-tafterstring-class)

Unfortunately I can't prove it to you inside this PR, because anchor links are not supported here.

I assume the escaping logic is the same for BitBucket, so I adjusted both MarkdownWriters.