mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 18:12:45 -05:00
Support ... terminating Yaml FrontMatter (#23195)
* FrontMatter rendered properly on markdownEngine * FrontMatter terminates for 3 - or . * Regex applied on both files for markdown
This commit is contained in:
committed by
Matt Bierner
parent
40c3d0a049
commit
9875ae1077
@@ -22,7 +22,7 @@ interface MarkdownIt {
|
||||
utils: any;
|
||||
}
|
||||
|
||||
const FrontMatterRegex = /^---\s*[^]*?---\s*/;
|
||||
const FrontMatterRegex = /^---\s*[^]*?(-{3}|\.{3})\s*/;
|
||||
|
||||
export class MarkdownEngine {
|
||||
private md: MarkdownIt;
|
||||
|
||||
@@ -3551,7 +3551,7 @@
|
||||
<key>begin</key>
|
||||
<string>\A-{3}\s*$</string>
|
||||
<key>while</key>
|
||||
<string>^(?!-{3}\s*$)</string>
|
||||
<string>^(?!(-{3}|\.{3})\s*$)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
@@ -1184,7 +1184,7 @@
|
||||
<key>begin</key>
|
||||
<string>\A-{3}\s*$</string>
|
||||
<key>while</key>
|
||||
<string>^(?!-{3}\s*$)</string>
|
||||
<string>^(?!(-{3}|\.{3})\s*$)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
Reference in New Issue
Block a user