Takes a piece of D code and outputs a sequence of HTML elements useful for syntax highlighting.
The output will contain <span> elements with the class attribute
set to the kind of entity that it contains. The class names are kept
compatible with the ones used for Google's prettify library: "typ", "kwd",
"com", "str", "lit", "pun", "pln", "spc"
The only addition is "spc", which denotes a special token sequence starting
with a "#", such as "#line" or "#!/bin/sh".
Note that this function will only perform actual syntax highlighting if
the libdparse package is available as a DUB dependency.
Takes a piece of D code and outputs a sequence of HTML elements useful for syntax highlighting.
The output will contain <span> elements with the class attribute set to the kind of entity that it contains. The class names are kept compatible with the ones used for Google's prettify library: "typ", "kwd", "com", "str", "lit", "pun", "pln", "spc"
The only addition is "spc", which denotes a special token sequence starting with a "#", such as "#line" or "#!/bin/sh".
Note that this function will only perform actual syntax highlighting if the libdparse package is available as a DUB dependency.