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

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

1 line
600 B
JavaScript
Raw Normal View History

hljs.registerLanguage("abnf",function(){"use strict";return function(s){return{name:"Augmented Backus-Naur Form",illegal:"[!@#$^&',?+~`|:]",keywords:"ALPHA BIT CHAR CR CRLF CTL DIGIT DQUOTE HEXDIG HTAB LF LWSP OCTET SP VCHAR WSP",contains:[{className:"attribute",begin:"^[a-zA-Z][a-zA-Z0-9-]*(?=\\s*=)"},s.COMMENT(";","$"),{className:"symbol",begin:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/},{className:"symbol",begin:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/},{className:"symbol",begin:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/},{className:"symbol",begin:/%[si]/},s.QUOTE_STRING_MODE,s.NUMBER_MODE]}}}());