开发者

Conditional logic in Markdown or other simple markup language? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

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 question

Im 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜