slate
项目有以下降价:
---
title: API Reference
language_tabs:
- http
- javascript
search: true
---
# Getting Started
## Logout
# Call Management
## Call States
```javascript
{
}
```
## Call Notification
## Caller ID Called Number
## Call Information During Call
我使用
middleman
来服务网站:bundle exec middleman server
。但是,最后一小节标题未正确解释为 h2
标签(屏幕截图)。如果我通过rake build
构建它,结果是一样的。
但是,如果我把这个 markdown 放在其他解释器上,比如 http://stackedit.io,那就没问题了。
所以我怀疑我的 Markdown 解释器(Ruby redcarpet)不知何故被破坏了。我在控制台上没有收到任何警告/错误消息。我尝试了不同版本的红地毯。解释的 HTML 也是错误的,尽管错误不同。我想 Ruby 和 Redcarpet 的某种组合会成功吗?
这是我的
config.rb
:
# Markdown
set :markdown_engine, :redcarpet
set :markdown,
fenced_code_blocks: true,
smartypants: true,
disable_indented_code_blocks: true,
prettify: true,
tables: true,
with_toc_data: true,
no_intra_emphasis: true
有人能告诉我可能的原因是什么吗?或者如何恢复?
更新到 RedCarpet 的最新版本(3.3.3)解决了我的问题。
嗯,它仍然有问题:我无法更改 Markdown 文件中的任何一个字母。否则,生成的 HTML 标记会再次出错...
终于解决了。将 RedCarpet 切换到 kramdown 解决了这个问题。
我的
config.rb
:
# set :markdown_engine, :redcarpet
set :markdown_engine, :kramdown
set :markdown,
fenced_code_blocks: true,
smartypants: true,
disable_indented_code_blocks: true,
prettify: true,
tables: true,
with_toc_data: true,
no_intra_emphasis: true