ruby - How to configure Octopress to support Pandoc fenced code blocks the same as back tick code blocks? -
how configure octopress format pandoc-style fenced code blocks in same way backtick code blocks supported?
i've configured octopress use pandoc markdown parser posts.
plugins/pandoc.rb:
require 'open3' module jekyll # return html5 class markdownconverter def convert(content) flags = @config['pandoc']['flags'] output = '' open3::popen3("pandoc -t html5 #{flags}") |stdin, stdout, stderr| stdin.puts content stdin.close output = stdout.read.strip end output end end end _config.yml:
markdown: pandoc pandoc: skip: false flags: '--smart --mathjax --highlight-style=pygments' octopress generates nice highlighting code blocks this:
``` [language] [title] [url] [link text] [linenos:false] [start:#] [mark:#,#-#] code snippet ``` however, pandoc fenced code blocks not being rendered octopress (no syntax highlighting, etc). example:
~~~ {.bash} echo hi ~~~ anybody found way solve this?
see https://groups.google.com/forum/#!topic/octopress/xcgidkhltq8
brandon mathis recommmended:
you build own plugin uses pandoc compatible regex, pandoc not supported octopress default.
Comments
Post a Comment