Skip to content

Commit

Permalink
fix(language-core): template language of .md files should be markdown
Browse files Browse the repository at this point in the history
close #4299
  • Loading branch information
johnsoncodehk committed May 14, 2024
1 parent 0f80d2d commit 52f88f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/language-core/lib/plugins/file-md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const plugin: VueLanguagePlugin = () => {
const sfc = parse(toString(codes));

if (sfc.descriptor.template) {
sfc.descriptor.template.lang = 'md';
transformRange(sfc.descriptor.template);
}
if (sfc.descriptor.script) {
Expand Down
2 changes: 1 addition & 1 deletion packages/language-core/lib/plugins/vue-template-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const plugin: VueLanguagePlugin = ({ modules }) => {

compileSFCTemplate(lang, template, options) {

if (lang === 'html') {
if (lang === 'html' || lang === 'md') {

const compiler = modules['@vue/compiler-dom'];

Expand Down

0 comments on commit 52f88f2

Please sign in to comment.