Skip to content

Commit eb70070

Browse files
Added support for SSML (#2306)
1 parent cde5b0f commit eb70070

9 files changed

+21
-14
lines changed

components.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@
4848
},
4949
"markup": {
5050
"title": "Markup",
51-
"alias": ["html", "xml", "svg", "mathml"],
51+
"alias": ["html", "xml", "svg", "mathml", "ssml"],
5252
"aliasTitles": {
5353
"html": "HTML",
5454
"xml": "XML",
5555
"svg": "SVG",
56-
"mathml": "MathML"
56+
"mathml": "MathML",
57+
"ssml": "SSML"
5758
},
5859
"option": "default"
5960
},

components/prism-markup.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ Prism.languages.markup = {
77
},
88
'cdata': /<!\[CDATA\[[\s\S]*?]]>/i,
99
'tag': {
10-
pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,
10+
pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,
1111
greedy: true,
1212
inside: {
1313
'tag': {
14-
pattern: /^<\/?[^\s>\/]+/i,
14+
pattern: /^<\/?[^\s>\/]+/,
1515
inside: {
1616
'punctuation': /^<\/?/,
1717
'namespace': /^[^\s>\/:]+:/
1818
}
1919
},
2020
'attr-value': {
21-
pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,
21+
pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,
2222
inside: {
2323
'punctuation': [
2424
/^=/,
@@ -97,7 +97,9 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', {
9797
}
9898
});
9999

100-
Prism.languages.xml = Prism.languages.extend('markup', {});
101100
Prism.languages.html = Prism.languages.markup;
102101
Prism.languages.mathml = Prism.languages.markup;
103102
Prism.languages.svg = Prism.languages.markup;
103+
104+
Prism.languages.xml = Prism.languages.extend('markup', {});
105+
Prism.languages.ssml = Prism.languages.xml;

components/prism-markup.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/autoloader/prism-autoloader.js

+1
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
"xml": "markup",
147147
"svg": "markup",
148148
"mathml": "markup",
149+
"ssml": "markup",
149150
"js": "javascript",
150151
"g4": "antlr4",
151152
"adoc": "asciidoc",

plugins/autoloader/prism-autoloader.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/show-language/prism-show-language.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"xml": "XML",
1717
"svg": "SVG",
1818
"mathml": "MathML",
19+
"ssml": "SSML",
1920
"css": "CSS",
2021
"clike": "C-like",
2122
"js": "JavaScript",

0 commit comments

Comments
 (0)