markdown - 如何在 Github Flavored Markdown 上的 html 代码中使用 {{ }} 括号?

标签 markdown jekyll github-flavored-markdown

我有下一个 github markdown,其中 {{ Product }} 是 AngularJS 模板助手:

```html
<div ng-controller="ProductCtrl">
    <ul>
        <li ng-repeat="product in products">
            {{ product }}
        </li>
    </ul>
</div>
```

不幸的是,输出结果不包含括号:

有什么办法可以解决这个问题吗?

编辑:

这是我的输出 html:

enter image description here

enter image description here

最佳答案

Raw 暂时禁用标签处理。这对于生成使用冲突语法的内容(例如,Mustache、Handlebars)非常有用。

{% raw %}
  In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not.
{% endraw %}

https://github.com/Shopify/liquid/wiki/liquid-for-designers#raw

关于markdown - 如何在 Github Flavored Markdown 上的 html 代码中使用 {{ }} 括号?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37834151/

相关文章:

syntax-highlighting - 如何扩展 pygments.lexers.shell 的关键字列表

shell - 将 Markdown 文件重新格式化为特定的代码风格

php - 在mysql中的序列化php中存储多语言数据

markdown - DOCFX 使用 Markdown 格式化表格而不更改模板

escaping - 为什么 '.' 是 Telegram 的 Bot API 中 MarkdownV2 中的保留字符?

javascript - 通过 PushState 和 Jekyll 使用 AJAX 加载

Jekyll 默认页面

markdown - 你如何在markdown中转义商标或版权符号?

github - Markdown 文件的 YAML header 在文档顶部生成奇怪的表格

markdown - 使用GitHub风格的markdown在表格中换行