File tree 3 files changed +34
-0
lines changed
3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,22 @@ hljs.registerLanguage('uri', function() {
48
48
] ,
49
49
}
50
50
} ) ;
51
+ hljs . registerLanguage ( 'eventstream' , function ( ) {
52
+ return {
53
+ contains : [
54
+ {
55
+ scope : "attr" ,
56
+ begin : / ^ / ,
57
+ end : ":" ,
58
+ } ,
59
+ {
60
+ scope : "literal" ,
61
+ begin : / : * / ,
62
+ end : / $ / ,
63
+ } ,
64
+ ] ,
65
+ }
66
+ } ) ;
51
67
const cheerio = require ( 'cheerio' ) ;
52
68
53
69
let argv = require ( 'yargs' )
Original file line number Diff line number Diff line change 45
45
</ code > </ pre >
46
46
< pre class ="nohighlight " tabindex ="0 "> < code > https://foo.com/bar{< span class ="hljs-attr "> ?baz*</ span > ,< span class ="hljs-attr "> qux</ span > }
47
47
</ code > </ pre >
48
+ < pre class ="nohighlight " tabindex ="0 "> < code > < span class ="hljs-attr "> data:</ span > This data is formatted
49
+ < span class ="hljs-attr "> data:</ span > across two lines
50
+ < span class ="hljs-attr "> retry:</ span > 5
51
+ < span class ="hljs-attr ">
52
+ event:</ span > add
53
+ < span class ="hljs-attr "> data:</ span > 1234.5678
54
+ < span class ="hljs-attr "> unknown-field:</ span > this is ignored
55
+ < span class ="hljs-attr "> </ span > </ code > </ pre >
48
56
</ section > </ section > < section class ="appendix "> < h1 > Appendix A: Revision History</ h1 >
49
57
< table >
50
58
< thead >
Original file line number Diff line number Diff line change @@ -62,6 +62,16 @@ https://foo.com/bar?baz=qux&fred=waldo#fragment
62
62
https://foo.com/bar{?baz*,qux}
63
63
```
64
64
65
+ ``` eventstream
66
+ data: This data is formatted
67
+ data: across two lines
68
+ retry: 5
69
+
70
+ event: add
71
+ data: 1234.5678
72
+ unknown-field: this is ignored
73
+ ```
74
+
65
75
## Appendix A: Revision History
66
76
67
77
Version | Date
You can’t perform that action at this time.
0 commit comments