Add yaml front matter support for Markdown (#15218)

* Add language support for yaml front matter to markdown grammar

* Add option to strip yaml front matter from preview

* Use enum for setting instead of boolean

* Better names

* Fix merge error
This commit is contained in:
Matt Bierner
2016-11-11 15:09:32 -08:00
committed by GitHub
parent c9a70707c0
commit eb563582f4
4 changed files with 306 additions and 3 deletions

View File

@@ -15,6 +15,10 @@
<string>Markdown</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#frontMatter</string>
</dict>
<dict>
<key>include</key>
<string>#block</string>
@@ -1880,6 +1884,20 @@
</dict>
</dict>
</dict>
<key>frontMatter</key>
<dict>
<key>begin</key>
<string>\A-{3}\s*$</string>
<key>while</key>
<string>^(?!-{3}\s*$)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>source.yaml</string>
</dict>
</array>
</dict>
</dict>
<key>scopeName</key>
<string>text.html.markdown</string>