Skip to content

Commit e32dd54

Browse files
committed
Update to support code block syntax highlighting of gherkin
1 parent 38a7c37 commit e32dd54

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

public/js/extra.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ require('prismjs/components/prism-go')
88
require('prismjs/components/prism-typescript')
99
require('prismjs/components/prism-jsx')
1010
require('prismjs/components/prism-makefile')
11+
require('prismjs/components/prism-gherkin')
1112

1213
import Prism from 'prismjs'
1314
import hljs from 'highlight.js'
@@ -510,7 +511,7 @@ export function finishView (view) {
510511
result = {
511512
value: code
512513
}
513-
} else if (reallang === 'haskell' || reallang === 'go' || reallang === 'typescript' || reallang === 'jsx') {
514+
} else if (reallang === 'haskell' || reallang === 'go' || reallang === 'typescript' || reallang === 'jsx' || reallang === 'gherkin') {
514515
code = S(code).unescapeHTML().s
515516
result = {
516517
value: Prism.highlight(code, Prism.languages[reallang])

public/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var cursorMenuThrottle = 50
9292
var cursorActivityDebounce = 50
9393
var cursorAnimatePeriod = 100
9494
var supportContainers = ['success', 'info', 'warning', 'danger']
95-
var supportCodeModes = ['javascript', 'typescript', 'jsx', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'haskell', 'coffeescript', 'yaml', 'pug', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile', 'tiddlywiki', 'mediawiki', 'go']
95+
var supportCodeModes = ['javascript', 'typescript', 'jsx', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'haskell', 'coffeescript', 'yaml', 'pug', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile', 'tiddlywiki', 'mediawiki', 'go', 'gherkin']
9696
var supportCharts = ['sequence', 'flow', 'graphviz', 'mermaid', 'abc']
9797
var supportHeaders = [
9898
{

0 commit comments

Comments
 (0)