UNPKG

highlight-languages

Version:
2 lines (1 loc) 786 B
!function(){"use strict";var e=function(e){var a={ruleDeclaration:"^[a-zA-Z][a-zA-Z0-9-]*",unexpectedChars:"[!@#$^&',?+~`|:]"},n=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],s=e.COMMENT(";","$"),i={className:"symbol",begin:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+){0,1}/},l={className:"symbol",begin:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+){0,1}/},r={className:"symbol",begin:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+){0,1}/},t={className:"symbol",begin:/%[si]/},c={begin:a.ruleDeclaration+"\\s*=",returnBegin:!0,end:/=/,relevance:0,contains:[{className:"attribute",begin:a.ruleDeclaration}]};return{illegal:a.unexpectedChars,keywords:n.join(" "),contains:[c,s,i,l,r,t,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}};hljs.registerLanguage("abnf",e)}();