feat: add mjml extension to html language (#5505)
parent
cd28c22dbe
commit
9d1fb93e86
|
@ -21,6 +21,11 @@ const languages = [
|
|||
since: "1.15.0",
|
||||
parsers: ["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"), {
|
||||
|
|
|
@ -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>
|
||||
|
||||
================================================================================
|
||||
`;
|
|
@ -0,0 +1 @@
|
|||
<mjml></mjml>
|
|
@ -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>
|
|
@ -0,0 +1 @@
|
|||
run_spec(__dirname, ["html"]);
|
|
@ -906,7 +906,8 @@ exports[`CLI --support-info (stdout) 1`] = `
|
|||
\\".inc\\",
|
||||
\\".st\\",
|
||||
\\".xht\\",
|
||||
\\".xhtml\\"
|
||||
\\".xhtml\\",
|
||||
\\".mjml\\"
|
||||
],
|
||||
\\"linguistLanguageId\\": 146,
|
||||
\\"name\\": \\"HTML\\",
|
||||
|
|
Loading…
Reference in New Issue