【发布时间】:2012-10-18 00:22:41
【问题描述】:
在 Slim 模板中进行一些 YAML 解析已经苦苦挣扎了一段时间。
我的 YAML 文件包含
shortdesc: >
markdown:
if you want to up the feelgood factor Cuban style, then this Monday night at The Buffalo Bar is for you...
但是当我在模板中输出 shortdesc 节点时,它会显示为字符串而不是解释。 ("markdown: if you....")
有没有办法解析 YAML 输出字符串来解释降价代码? 如果我尝试
p
markdown:
= shortdesc
模板不理解对包含 YAML 节点的变量的调用。
这可能吗?
【问题讨论】:
标签: ruby parsing markdown slim-lang