Verified Commit 8224c916 authored by Camil Staps's avatar Camil Staps 🚀

Some more syntax elements

parent 1f0552ba
This diff is collapsed.
......@@ -183,11 +183,14 @@ function makeRequiredContext(context) {
}
function highlightExample(example) {
if ('cleanjs_start' in example) {
return window['highlight' + example.cleanjs_type](
var f = 'highlight' + example.cleanjs_type;
if (!(f in window)) {
return example.example;
} else if ('cleanjs_start' in example) {
return window[f](
example.example, highlightCallback, example.cleanjs_start);
} else {
return window['highlight' + example.cleanjs_type](
return window[f](
example.example, highlightCallback);
}
}
......@@ -210,7 +213,12 @@ function highlightSyntaxConstruct(elem) {
[/(\w+)/, ['keyword optional']],
[/(\S)/, ['punctuation']]
]
}, elem, highlightCallback);
}, elem, function (span, cls, str) {
if (str == '...')
return span.replace('...', '…');
else
return span;
});
}
function makeExampleList(examples) {
......
Subproject commit 863107307d241f4e20a7c60dec4807ccdb05e395
Subproject commit 15b6e7cc7b38ef9329bde6866ca2fcbabe3af83e
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment