Rename yaml-hl to yaml-highlight.
[pyyaml/python3.git] / examples / yaml-highlight / yaml_hl.cfg
blob69bb8477648179b1011df44e90fd71a09f398b85
1 %YAML 1.1
2 ---
4 ascii:
6     header: "\e[0;1;30;40m"
8     footer: "\e[0m"
10     tokens:
11         stream-start:
12         stream-end:
13         directive:              { start: "\e[35m", end: "\e[0;1;30;40m" }
14         document-start:         { start: "\e[35m", end: "\e[0;1;30;40m" }
15         document-end:           { start: "\e[35m", end: "\e[0;1;30;40m" }
16         block-sequence-start:
17         block-mapping-start:
18         block-end:
19         flow-sequence-start:    { start: "\e[33m", end: "\e[0;1;30;40m" }
20         flow-mapping-start:     { start: "\e[33m", end: "\e[0;1;30;40m" }
21         flow-sequence-end:      { start: "\e[33m", end: "\e[0;1;30;40m" }
22         flow-mapping-end:       { start: "\e[33m", end: "\e[0;1;30;40m" }
23         key:                    { start: "\e[33m", end: "\e[0;1;30;40m" }
24         value:                  { start: "\e[33m", end: "\e[0;1;30;40m" }
25         block-entry:            { start: "\e[33m", end: "\e[0;1;30;40m" }
26         flow-entry:             { start: "\e[33m", end: "\e[0;1;30;40m" }
27         alias:                  { start: "\e[32m", end: "\e[0;1;30;40m" }
28         anchor:                 { start: "\e[32m", end: "\e[0;1;30;40m" }
29         tag:                    { start: "\e[32m", end: "\e[0;1;30;40m" }
30         scalar:                 { start: "\e[36m", end: "\e[0;1;30;40m" }
32     replaces:
33         - "\r\n":   "\n"
34         - "\r":     "\n"
35         - "\n":     "\n"
36         - "\x85":   "\n"
37         - "\u2028": "\n"
38         - "\u2029": "\n"
40 html: &html
42     tokens:
43         stream-start:
44         stream-end:
45         directive:              { start: <code class="directive_token">, end: </code> }
46         document-start:         { start: <code class="document_start_token">, end: </code> }
47         document-end:           { start: <code class="document_end_token">, end: </code> }
48         block-sequence-start:
49         block-mapping-start:
50         block-end:
51         flow-sequence-start:    { start: <code class="delimiter_token">, end: </code> }
52         flow-mapping-start:     { start: <code class="delimiter_token">, end: </code> }
53         flow-sequence-end:      { start: <code class="delimiter_token">, end: </code> }
54         flow-mapping-end:       { start: <code class="delimiter_token">, end: </code> }
55         key:                    { start: <code class="delimiter_token">, end: </code> }
56         value:                  { start: <code class="delimiter_token">, end: </code> }
57         block-entry:            { start: <code class="delimiter_token">, end: </code> }
58         flow-entry:             { start: <code class="delimiter_token">, end: </code> }
59         alias:                  { start: <code class="anchor_token">, end: </code> }
60         anchor:                 { start: <code class="anchor_token">, end: </code> }
61         tag:                    { start: <code class="tag_token">, end: </code> }
62         scalar:                 { start: <code class="scalar_token">, end: </code> }
64     events:
65         stream-start:   { start: <pre class="yaml_stream"> }
66         stream-end:     { end: </pre> }
67         document-start: { start: <span class="document"> }
68         document-end:   { end: </span> }
69         sequence-start: { start: <span class="sequence"> }
70         sequence-end:   { end: </span> }
71         mapping-start:  { start: <span class="mapping"> }
72         mapping-end:    { end: </span> }
73         scalar:         { start: <span class="scalar">, end: </span> }
75     replaces:
76         - "\r\n":   "\n"
77         - "\r":     "\n"
78         - "\n":     "\n"
79         - "\x85":   "\n"
80         - "\u2028": "\n"
81         - "\u2029": "\n"
82         - "&":      "&amp;"
83         - "<":      "&lt;"
84         - ">":      "&gt;"
86 html-page:
88     header: |
89         <html>
90         <head>
91         <title>A YAML stream</title>
92         <style type="text/css">
93             .document { background: #FFF }
94             .sequence { background: #EEF }
95             .mapping { background: #EFE }
96             .scalar { background: #FEE }
97             .directive_token { color: #C0C }
98             .document_start_token { color: #C0C; font-weight: bold }
99             .document_end_token { color: #C0C; font-weight: bold }
100             .delimiter_token { color: #600; font-weight: bold }
101             .anchor_token { color: #090 }
102             .tag_token { color: #090 }
103             .scalar_token { color: #000 }
104             .yaml_stream { color: #999 }
105         </style>
106         <body>
108     footer: |
109         </body>
110         </html>
112     <<: *html
115 # vim: ft=yaml