discourse/vendor/assets/javascripts/highlightjs/languages/latex.min.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1 line
709 B
JavaScript
Raw Normal View History

2020-05-29 00:15:13 +08:00
hljs.registerLanguage("latex",function(){"use strict";return function(e){var n={className:"tag",begin:/\\/,relevance:0,contains:[{className:"name",variants:[{begin:/[a-zA-Z\u0430-\u044f\u0410-\u042f]+[*]?/},{begin:/[^a-zA-Z\u0430-\u044f\u0410-\u042f0-9]/}],starts:{endsWithParent:!0,relevance:0,contains:[{className:"string",variants:[{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/}]},{begin:/\s*=\s*/,endsWithParent:!0,relevance:0,contains:[{className:"number",begin:/-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/}]}]}}]};return{name:"LaTeX",aliases:["tex"],contains:[n,{className:"formula",contains:[n],relevance:0,variants:[{begin:/\$\$/,end:/\$\$/},{begin:/\$/,end:/\$/}]},e.COMMENT("%","$",{relevance:0})]}}}());