Documentation ¶
Overview ¶
The package decorate is used to highlight code by passing it though an input filter and output filter. Both filters can be configured.
code -> input filter -> (intermediate format) -> output filter -> output
for example
code.xml -> xml lexer -> html renderer -> output.html
The intermediate format is not visible to the user and only used as a protocol between the input and output filter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HighlightFile ¶
Return a string rendering the given file using the outputfilter and running the inputfilter as a lexer.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
inputfilter
|
|
lua
Syntax highlighting for Lua programs.
|
Syntax highlighting for Lua programs. |
text
Sample input filter (basicly a no-op)
|
Sample input filter (basicly a no-op) |
xml
Syntax highlighting for XML files.
|
Syntax highlighting for XML files. |
outputfilter
|
|
debug
Sample output filter for debugging purpose.
|
Sample output filter for debugging purpose. |
html
Package html is an output filter to generate an html chunk wrapped in a div to be highlighted by CSS.
|
Package html is an output filter to generate an html chunk wrapped in a div to be highlighted by CSS. |
text
Sample output filter (basicly a no-op).
|
Sample output filter (basicly a no-op). |
Main controller package for syntax highlighting
|
Main controller package for syntax highlighting |
sanitizer
|
|
noop
Just a dummy filter do demonstrate the sanitizers
|
Just a dummy filter do demonstrate the sanitizers |
removeduplicates
Merge two adjacent tokens with the same major and minor number into one token.
|
Merge two adjacent tokens with the same major and minor number into one token. |
Click to show internal directories.
Click to hide internal directories.