Closed allista closed 4 months ago
@allista thanks will review this. In the meantime setting "useHTMLAnchors" to "true" should provide a workaround. (This should write anchors to page in expected format).
Thanks, this helps. But messes scrolling into view a bit: with an anchor added just above a title, the title itself is always not visible -- scrolled just one "line" too much.
Should be fixed properly in typedoc-plugin-markdown@4.2.2
What package is the bug related to?
typedoc-plugin-markdown
Describe the issue
The plugin generates links to sections in the same document using hash fragments assuming that corresponding IDs are generated by markdown renderer. But there's no way to configure the format of those IDs.
In particular, when the generated markdown is integrated into a docusaurus site, the generated IDs do not match in case a section title contains spaces: docusaurus replaces spaces with
-
, while the plugin removes the spaces completely.Docusaurus does not have any means to configure this as well
Example
Generated title and link for a type definition with multiple generic type parameters are as follows:
But docusaurus renders the following (class is ommited):
TypeDoc configuration
Expected behavior
Expect to either out-of-the-box compatibility with docusaurus or means to configure hash-fragment links structure.