mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-02-26 16:47:41 +01:00
8 lines
559 B
JavaScript
8 lines
559 B
JavaScript
hljs.registerLanguage("nestedtext",(()=>{"use strict";return t=>({
|
|
name:"Nested Text",aliases:["nt"],contains:[t.inherit(t.HASH_COMMENT_MODE,{
|
|
begin:/^\s*(?=#)/,excludeBegin:!0}),{variants:[{match:[/^\s*/,/-/,/[ ]/,/.*$/]
|
|
},{match:[/^\s*/,/-$/]}],className:{2:"bullet",4:"string"}},{
|
|
match:[/^\s*/,/>/,/[ ]/,/.*$/],className:{2:"punctuation",4:"string"}},{
|
|
match:[/^\s*(?=\S)/,/[^:]+/,/:\s*/,/$/],className:{2:"attribute",3:"punctuation"
|
|
}},{match:[/^\s*(?=\S)/,/[^:]*[^: ]/,/[ ]*:/,/[ ]/,/.*$/],className:{
|
|
2:"attribute",3:"punctuation",5:"string"}}]})})()); |