Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this questionIm looking for an implementation of a Markdown-like language that will allow me to embed "conditional logic" within my document.
I imagine the document would look something like:
This text should be included in all processed versions of the document
[platform==foo]
This is an example for platform Foo
[platform==bar]
This is an example for platform Bar
Then different versions of the document could be produced by passing parameters to the processing script:
开发者_C百科./process-markdown --platform=foo
My Googling hasn't returned anything close to this, though I feel like something like this must exist for software documentation.
I had this issue today and found another interesting approach here using markdown and gpp: https://adityam.github.io/context-blog/post/markdown-with-gpp/
AsciiDoc has Conditional Inclusion Macros.
Doxygen also can be used as a Markup-language and have \if, \endif etc. commands.
For Markdown it's maybe easier you write your own simple regex-filter-script.
精彩评论