Playground: autofold for Markdown and other languages (#8331)
This commit is contained in:
1 parent
c5ece64c21
commit
caeb367c16
1 file changed
+11
-1
@@ -56,6 +56,9 @@ const astAutoFold = {
|
||||
estree: /^\s*"(loc|start|end)":/,
|
||||
postcss: /^\s*"(source|input|raws|file)":/,
|
||||
html: /^\s*"(sourceSpan|valueSpan|nameSpan|startSourceSpan|endSourceSpan|tagDefinition)":/,
|
||||
mdast: /^\s*"position":/,
|
||||
yaml: /^\s*"position":/,
|
||||
glimmer: /^\s*"loc":/,
|
||||
};
|
||||
|
||||
export function getAstAutoFold(parser) {
|
||||
@@ -76,7 +79,14 @@ export function getAstAutoFold(parser) {
|
||||
case "html":
|
||||
case "angular":
|
||||
case "vue":
|
||||
case "lws":
|
||||
case "lwc":
|
||||
return astAutoFold.html;
|
||||
case "markdown":
|
||||
case "mdx":
|
||||
return astAutoFold.mdast;
|
||||
case "yaml":
|
||||
return astAutoFold.yaml;
|
||||
case "glimmer":
|
||||
return astAutoFold.glimmer;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user