0

I usually use ReST and Sphinx for generating documentation, but I'm dealing with a pre-existing Markdown system. I'd like to use MyST and Sphinx to generate documentation with references and autodoc, but make it available to the existing system as well. Is there a way to automatically strip out the MyST-specific syntax from the Markdown files?

I tried just rendering MyST syntax with a regular Markdown parser and the MyST-specific syntax was either treated as regular text or a code block.

mzjn
  • 48,958
  • 13
  • 128
  • 248
aviso
  • 2,371
  • 1
  • 14
  • 15
  • No, not if you want to use autodoc. That feature does not exist in "regular" Markdown. – Steve Piercy Mar 27 '22 at 10:07
  • @StevePiercy That's why the ask is if there is a way to remove the Myst-specific syntax – aviso Mar 28 '22 at 12:27
  • No. If you want to use autodoc, you cannot use "regular" Markdown, and you must use MyST or reST. – Steve Piercy Mar 29 '22 at 08:50
  • @StevePiercy the ask is not how to use autodoc with regular Markdown, it is how to take MyST Markdown and strip out the MyST-specific syntax. – aviso Mar 30 '22 at 14:06
  • You should edit your question to clarify what you want to achieve. Currently you say "I'd like to use MyST and Sphinx to generate documentation with references **and autodoc**, but make it available to the existing system as well." – Steve Piercy Mar 31 '22 at 04:49
  • 1
    To answer your intended question, no there is not. You would have to roll your own regular expressions to identify and remove MyST syntax. – Steve Piercy Mar 31 '22 at 04:51

0 Answers0