Documentation Markdown或其他简单标记语言中的条件逻辑?

Documentation Markdown或其他简单标记语言中的条件逻辑?,documentation,markdown,documentation-generation,Documentation,Markdown,Documentation Generation,我正在寻找一种类似减价的语言的实现,它允许我在文档中嵌入“条件逻辑” 我想该文件看起来会像: 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 然后,通过向处理脚本传递参数,可以生成不同版本的文

我正在寻找一种类似减价的语言的实现,它允许我在文档中嵌入“条件逻辑”

我想该文件看起来会像:

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
然后,通过向处理脚本传递参数,可以生成不同版本的文档:

./process-markdown --platform=foo
我的谷歌搜索没有返回任何与此相近的结果,尽管我觉得软件文档中必须存在类似的东西。

也可以用作标记语言并具有命令


对于Markdown,您可能更容易编写自己的简单正则表达式过滤器脚本。

我今天遇到了这个问题,并在这里找到了另一个使用Markdown和gpp的有趣方法: