Maruku告诉你:我怎么了?

时间:2012-07-26 14:52:19

标签: ruby jekyll maruku

我使用jekyll --server在localhost上测试我的网站。 但是有几行输入,如下所示:

 ___________________________________________________________________________
 | Maruku tells you:
 +---------------------------------------------------------------------------
 | String finished while reading (break on []) already read: "$ git init"
 | ---------------------------------------------------------------------------
 +---------------------------------------------------------------------------
 !/usr/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maru/errors_management.rb:49:in `maruku_error'
 !/usr/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/input/parse_span_better.rb:402:in `read_simple'
 !/usr/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/input/parse_span_better.rb:521:in `read_inline_code'
 !/usr/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/input/parse_span_better.rb:89:in `read_span'
 !/usr/lib/ruby/gems/1.8/gems/maruku-0.6.0/lib/maruku/input/    parse_span_better.rb:46:in    `parse_span_better'
 \___________________________________________________________________________
 ___________________________________________________________________________
 | Maruku tells you:
 +---------------------------------------------------------------------------
 | Could not find ref_id = "url" for md_link(["url"],"url")
 | Available refs are []
 +---------------------------------------------------------------------------
 Not creating a link for ref_id = "url".

我不知道哪里出错,我应该修复哪个文件? 该网站仍然有效。

2 个答案:

答案 0 :(得分:10)

问题很可能是你的代码中有这个问题:

Blah blah [url] blah blah.

如果要保留方括号,请按以下方式对其进行编码:

Blah blah \[url\] blah blah.

更多信息:http://daringfireball.net/projects/markdown/syntax#backslash

答案 1 :(得分:1)

我遇到过这个问题,原因是Markdown文件是从GitHub README.md复制而来的,其中包含一些GitHub-Flavoured Markdown

```JavaScript
var foo = 'bar';
```

这在GitHub README.md文件中运行良好,但在Jekyll中不适用于Maruku,这意味着在使用GitHub Pages托管网站时它不起作用。