File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 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() {
4848 ] ,
4949 }
5050 } ) ;
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+ } ) ;
5167const cheerio = require ( 'cheerio' ) ;
5268
5369let argv = require ( 'yargs' )
Original file line number Diff line number Diff line change 4545</ code > </ pre >
4646< pre class ="nohighlight " tabindex ="0 "> < code > https://foo.com/bar{< span class ="hljs-attr "> ?baz*</ span > ,< span class ="hljs-attr "> qux</ span > }
4747</ 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 >
4856</ section > </ section > < section class ="appendix "> < h1 > Appendix A: Revision History</ h1 >
4957< table >
5058< thead >
Original file line number Diff line number Diff line change @@ -62,6 +62,16 @@ https://foo.com/bar?baz=qux&fred=waldo#fragment
6262https://foo.com/bar{?baz*,qux}
6363```
6464
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+
6575## Appendix A: Revision History
6676
6777Version | Date
You can’t perform that action at this time.
0 commit comments