小编reh*_*ift的帖子

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

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

我想该文档会类似于:

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
Run Code Online (Sandbox Code Playgroud)

然后可以通过将参数传递给处理脚本来生成文档的不同版本:

./process-markdown --platform=foo
Run Code Online (Sandbox Code Playgroud)

我的谷歌搜索没有返回任何接近于此的内容,尽管我觉得软件文档中必须存在这样的东西。

documentation markdown documentation-generation

5
推荐指数
1
解决办法
1万
查看次数

Emacs中缺少regexp-opt功能?

我开始玩elisp来在Emacs中创建字体锁(语法高亮).大多数教程都提到使用elisp函数"regexp-opt"来优化正则表达式,但我的emacs版本(23.2)似乎没有这个功能.此外,谷歌搜索答案似乎没有出现有用的结果.有任何想法吗?

emacs elisp

2
推荐指数
2
解决办法
588
查看次数