Skip to content

Commit 4c82b31

Browse files
committed
Add highlight.js support for text/event-stream
1 parent beb56e0 commit 4c82b31

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

scripts/md2html/md2html.js

+16
Original file line numberDiff line numberDiff 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+
});
5167
const cheerio = require('cheerio');
5268

5369
let argv = require('yargs')

0 commit comments

Comments
 (0)