feat: add mjml extension to html language (#5505)

This commit is contained in:
Laurin Quast authored and Ika committed 2018-12-07 21:01:40 +08:00
1 parent cd28c22dbe
commit 9d1fb93e86
6 files changed
+99 -1

No files matched your search

+5
View File
@@ -21,6 +21,11 @@ const languages = [
since: "1.15.0", since: "1.15.0",
parsers: ["html"], parsers: ["html"],
vscodeLanguageIds: ["html"] vscodeLanguageIds: ["html"]
},
extend: {
extensions: [
".mjml" // MJML is considered XML in Linguist but it should be formatted as HTML
]
} }
}), }),
createLanguage(require("linguist-languages/data/vue"), { createLanguage(require("linguist-languages/data/vue"), {
@@ -0,0 +1,65 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`empty.mjml 1`] = `
====================================options=====================================
parsers: ["html"]
printWidth: 80
| printWidth
=====================================input======================================
<mjml></mjml>
=====================================output=====================================
<mjml></mjml>
================================================================================
`;
exports[`head.mjml 1`] = `
====================================options=====================================
parsers: ["html"]
printWidth: 80
| printWidth
=====================================input======================================
<mjml>
<mj-head>
<mj-title>
The green fix eats mango.
</mj-title>
<mj-breakpoint width="600px" />
<mj-preview>Do
you like cheese? We do!</mj-preview>
<mj-attributes>
<mj-text
align="left" color="#000"
font-family="-apple-system,BlinkMacSystemFont,Helvetica,sans-serif" />
</mj-attributes>
</mj-head>
</mjml>
=====================================output=====================================
<mjml>
<mj-head>
<mj-title> The green fix eats mango. </mj-title>
<mj-breakpoint width="600px" />
<mj-preview>Do you like cheese? We do!</mj-preview>
<mj-attributes>
<mj-text
align="left"
color="#000"
font-family="-apple-system,BlinkMacSystemFont,Helvetica,sans-serif"
/>
</mj-attributes>
</mj-head>
</mjml>
================================================================================
`;
+1
View File
@@ -0,0 +1 @@
<mjml></mjml>
+25
View File
@@ -0,0 +1,25 @@
<mjml>
<mj-head>
<mj-title>
The green fix eats mango.
</mj-title>
<mj-breakpoint width="600px" />
<mj-preview>Do
you like cheese? We do!</mj-preview>
<mj-attributes>
<mj-text
align="left" color="#000"
font-family="-apple-system,BlinkMacSystemFont,Helvetica,sans-serif" />
</mj-attributes>
</mj-head>
</mjml>
+1
View File
@@ -0,0 +1 @@
run_spec(__dirname, ["html"]);
@@ -906,7 +906,8 @@ exports[`CLI --support-info (stdout) 1`] = `
\\".inc\\", \\".inc\\",
\\".st\\", \\".st\\",
\\".xht\\", \\".xht\\",
\\".xhtml\\" \\".xhtml\\",
\\".mjml\\"
], ],
\\"linguistLanguageId\\": 146, \\"linguistLanguageId\\": 146,
\\"name\\": \\"HTML\\", \\"name\\": \\"HTML\\",