mvhenderson / pandoc-highlighter

Pandoc source code highlighting with CodeMirror

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About

A Pandoc filter for highlighting code using CodeMirror

Why

For languages that Pandoc doesn't support, such as a DSL that cannot be open source.

Also, with custom templates, it allows for more control over syntax highlighting colors.

How

During filtering it replaces Code and CodeBlock elements with RawInline and RawBlock elements.

Currently the supported output formats are:

  • html / html5 / epub3
  • latex / pdf
  • docx / openxml

Out of the box it supports all the standard Pandoc themes, though not as granular as the CodeMirror themes.

Install

npm install -g pandoc-highlighter

Example

pandoc -o sample.html -F pandoc-highlighter sample.md

License

MIT

About

Pandoc source code highlighting with CodeMirror

License:MIT License


Languages

Language:JavaScript 95.2%Language:Shell 4.3%Language:C++ 0.5%