File tree 2 files changed +4
-0
lines changed
packages/language-core/lib/plugins
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 32
32
"pnpm" : {
33
33
"onlyBuiltDependencies" : [
34
34
" @tsslint/core" ,
35
+ " @tsslint/eslint" ,
35
36
" @vscode/vsce-sign" ,
36
37
" esbuild" ,
37
38
" keytar" ,
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import type { VueLanguagePlugin } from '../types';
5
5
import { buildMappings } from '../utils/buildMappings' ;
6
6
import { parse } from '../utils/parseSfc' ;
7
7
8
+ const frontmatterReg = / ^ - - - [ \s \S ] * ?\n - - - (?: \r ? \n | $ ) / ;
8
9
const codeblockReg = / ( ` { 3 , } ) [ \s \S ] + ?\1/ g;
9
10
const inlineCodeblockReg = / ` [ ^ \n ` ] + ?` / g;
10
11
const latexBlockReg = / ( \$ { 2 , } ) [ \s \S ] + ?\1/ g;
@@ -36,6 +37,8 @@ const plugin: VueLanguagePlugin = ({ vueCompilerOptions }) => {
36
37
}
37
38
38
39
content = content
40
+ // frontmatter
41
+ . replace ( frontmatterReg , match => ' ' . repeat ( match . length ) )
39
42
// code block
40
43
. replace ( codeblockReg , ( match , quotes ) => quotes + ' ' . repeat ( match . length - quotes . length * 2 ) + quotes )
41
44
// inline code block
You can’t perform that action at this time.
0 commit comments