2020-05-29 16:21:21 +08:00
|
|
|
hljs.registerLanguage("asciidoc",function(e){return{aliases:["adoc"],c:[e.C("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.C("^//","$",{relevance:0}),{cN:"title",b:"^\\.\\w.*$"},{b:"^[=\\*]{4,}\\n",e:"\\n^[=\\*]{4,}$",relevance:10},{cN:"section",relevance:10,v:[{b:"^(={1,5}) .+?( \\1)?$"},{b:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{cN:"meta",b:"^:.+?:",e:"\\s",eE:!0,relevance:10},{cN:"meta",b:"^\\[.+?\\]$",relevance:0},{cN:"quote",b:"^_{4,}\\n",e:"\\n_{4,}$",relevance:10},{cN:"code",b:"^[\\-\\.]{4,}\\n",e:"\\n[\\-\\.]{4,}$",relevance:10},{b:"^\\+{4,}\\n",e:"\\n\\+{4,}$",c:[{b:"<",e:">",sL:"xml",relevance:0}],relevance:10},{cN:"bullet",b:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{cN:"symbol",b:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{cN:"strong",b:"\\B\\*(?![\\*\\s])",e:"(\\n{2}|\\*)",c:[{b:"\\\\*\\w",relevance:0}]},{cN:"emphasis",b:"\\B'(?!['\\s])",e:"(\\n{2}|')",c:[{b:"\\\\'\\w",relevance:0}],relevance:0},{cN:"emphasis",b:"_(?![_\\s])",e:"(\\n{2}|_)",relevance:0},{cN:"string",v:[{b:"``.+?''"},{b:"`.+?'"}]},{cN:"code",b:"(`.+?`|\\+.+?\\+)",relevance:0},{cN:"code",b:"^[ \\t]",e:"$",relevance:0},{b:"^'{3,}[ \\t]*$",relevance:10},{b:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",rB:!0,c:[{b:"(link|image:?):",relevance:0},{cN:"link",b:"\\w",e:"[^\\[]+",relevance:0},{cN:"string",b:"\\[",e:"\\]",eB:!0,eE:!0,relevance:0}],relevance:10}]}});
|