source: pyyaml/trunk/examples/yaml-hl/yaml_hl_html.cfg @ 130

Revision 130, 2.0 KB checked in by xi, 9 years ago (diff)

Add style information to events generated by Parser.

Line 
1
2tokens:
3    stream-start:
4    stream-end:
5    directive:              { start: <code class="directive-token">, end: </code> }
6    document-start:         { start: <code class="document-start-token">, end: </code> }
7    document-end:           { start: <code class="document-end-token">, end: </code> }
8    block-sequence-start:
9    block-mapping-start:
10    block-end:
11    flow-sequence-start:    { start: <code class="delimiter-token">, end: </code> }
12    flow-mapping-start:     { start: <code class="delimiter-token">, end: </code> }
13    flow-sequence-end:      { start: <code class="delimiter-token">, end: </code> }
14    flow-mapping-end:       { start: <code class="delimiter-token">, end: </code> }
15    key:                    { start: <code class="delimiter-token">, end: </code> }
16    value:                  { start: <code class="delimiter-token">, end: </code> }
17    block-entry:            { start: <code class="delimiter-token">, end: </code> }
18    flow-entry:             { start: <code class="delimiter-token">, end: </code> }
19    alias:                  { start: <code class="anchor-token">, end: </code> }
20    anchor:                 { start: <code class="anchor-token">, end: </code> }
21    tag:                    { start: <code class="tag-token">, end: </code> }
22    scalar:                 { start: <code class="scalar-token">, end: </code> }
23
24events:
25    stream-start:   { start: <pre class="yaml-stream"> }
26    stream-end:     { end: </pre> }
27    document-start: { start: <span class="document"> }
28    document-end:   { end: </span> }
29    sequence-start: { start: <span class="sequence"> }
30    sequence-end:   { end: </span> }
31    mapping-start:  { start: <span class="mapping"> }
32    mapping-end:    { end: </span> }
33    scalar:         { start: <span class="scalar">, end: </span> }
34
35replaces: !!pairs
36    - "\r\n":   "\n"
37    - "\r":     "\n"
38    - "\n":     "\n"
39    - "\x85":   "\n"
40    - "\u2028": "\n"
41    - "\u2029": "\n"
42    - "<":      "&lt;"
43    - ">":      "&gt;"
44    - "&":      "&amp;"
45
46# vim: ft=yaml
Note: See TracBrowser for help on using the repository browser.