Format tokens using HTML spans inside code tags. For example,
A KeywordTok is rendered as a span with class kw.
Short class names correspond to TokenTypes as follows:
KeywordTok = kw,
DataTypeTok = dt,
DecValTok = dv,
BaseNTok = bn,
FloatTok = fl,
CharTok = ch,
StringTok = st,
CommentTok = co,
OtherTok = ot,
AlertTok = al,
FunctionTok = fu,
RegionMarkerTok = re,
ErrorTok = er,
ConstantTok = cn,
SpecialCharTok = sc,
VerbatimStringTok = vs,
SpecialStringTok = ss,
ImportTok = im,
DocumentationTok = do,
AnnotationTok = an,
CommentVarTok = cv,
VariableTok = va,
ControlFlowTok = cf,
OperatorTok = op,
BuiltInTok = bu,
ExtensionTok = ex,
PreprocessorTok = pp,
AttributeTok = at,
InformationTok = in,
WarningTok = wa.
A NormalTok is not marked up at all.
Moduleskylighting-format-blaze-html-0.1.2.2Haskell2010
Skylighting.Format.HTML
- 4 values
- Packageskylighting-format-blaze-html-0.1.2.2
- Exports4
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceHTML.hs
Format tokens as an HTML pre block. Each line is wrapped in a
span element whose id is the line number (prefixed with lineIdPrefix),
beginning with an empty anchor linking to the line. If line numbering
is selected, the surrounding pre is given the class ‘numberSource’,
and the resulting html will display line numbers thanks to the included
CSS. See the documentation for formatHtmlInline for information about how
tokens are encoded.
Like formatHtmlBlock but uses only attributes valid in HTML 4
(so, no aria-hidden or aria-label attributes are used on the
line anchors).
Returns CSS for styling highlighted code according to the given style.