分享 html-pipeline: Chainable Content Filters

linjunpop · November 28, 2012 · Last by huacnlee replied at November 28, 2012 · 2616 hits

https://github.com/blog/1311-html-pipeline-chainable-content-filters

pipeline = HTML::Pipeline.new [
  HTML::Pipeline::MarkdownFilter,
  HTML::Pipeline::SyntaxHighlightFilter
]
result = pipeline.call <<CODE
This is *great*:

    some_code(:first)

CODE
result[:output].to_s

看起来很不错啊!

@huacnlee 也许 RubyChina 可以用这个?

没有必要调整了,Ruby China 的 Markdown 里面有许多细节的,看起来那个没有特别值得话这么大工程去替换的

You need to Sign in before reply, if you don't have an account, please Sign up first.