typedoc-plugin-markdown
typedoc-plugin-markdown copied to clipboard
Characters `<` and `>` are not being escaped using Docusarus 3.
The following generated markdown will result in an error while using the plugin with Docusarus 3 and MDX 3.
> **new View**<`CameraControllerTypes`, `CameraControllerKind`>(
Probably need to escape these,
The issue can be reproduced by pasting the above problematic markdown in MDX Playground
This is also mentioned in upgrade guide of Docusarus V3 https://docusaurus.io/docs/migration/v3#common-mdx-problems
Environment Info:
Docusarus version: 3.0.0
@mdx-js/react: 3.0.0
docusaurus-plugin-typedoc: 1.0.0-next.21
typedoc-plugin-frontmatter: 0.0.2
typedoc-plugin-markdown: 4.0.0-next.27
Both opening and closing brackets should be escaped. Would you mind pasting in your source?
This looks like documentation of a class constructor but you should see this
> **new View**\<`CameraControllerTypes`, `CameraControllerKind`\>()
@aamir1995 This plugin generates plain markdown files, docusaurus treats these (by default in V3) as mdx (which is not vanilla md) files. I had the exact same error you had, i fixed it by adding
markdown: {
format: 'detect'
},
to docusaurus.config.ts
. You can even test this in the MDX Playground link you provided by setting the input format to markdown
@CoderIllusionist thanks for the suggestion! I was having issues with using { } in a JS comment throwing an acorn error and using your suggestion fixed it.
@CoderIllusionist thanks man! this setting made my day :-)