UNPKG

@highlightjs/cdn-assets

Version:

Syntax highlighting with language autodetection. (pre-compiled CDN assets)

15 lines 985 B
/*! `gherkin` grammar compiled for Highlight.js 11.12.0 */ (()=>{var e=(()=>{"use strict";const e={scope:"variable",begin:/<[^>\s]+>/ },n=/^[ \t]*/;return t=>{const i={begin:[n,/\b(?:Given|When|Then|And|But)\b/], beginScope:{2:"keyword"},end:/$/,contains:[e,t.QUOTE_STRING_MODE]},s={ begin:[n,/\*(?=[ \t])/],beginScope:{2:"keyword"},end:/$/, contains:[e,t.QUOTE_STRING_MODE]};return{name:"Gherkin",aliases:["feature"], contains:[{scope:"comment",begin:/^[ \t]*#/,end:/$/},{ begin:[n,/@[^@\s]+(?:[ \t]+@[^@\s]+)*/],beginScope:{2:"meta"}},{scope:"string", variants:[{begin:/^[ \t]*"""\w*/,end:/^[ \t]*"""[ \t]*$/},{ begin:/^[ \t]*```\w*/,end:/^[ \t]*```[ \t]*$/}]},{ begin:[n,/(Feature|Business Need|Ability|Rule|Examples?|Scenario(?:s| Outline| Template)?|Background)/,/:/], beginScope:{2:"keyword",3:"punctuation"},end:/$/, contains:[e,t.QUOTE_STRING_MODE]},i,s,{begin:/^[ \t]*\|/,end:/$/,contains:[e,{ scope:"string",match:/[^|<\n]+/}]}]}}})();hljs.registerLanguage("gherkin",e) })();