提交 603e08d6 编写于 作者: M Matt Bierner 提交者: GitHub

Improve Markdown Html Block Colorization (#12696)

* Add rule for html comment in blocks

* Match common mark spec for html comments

* Updating tests and fixing some token names

* Fix style and script blocks

* Fix test file results

* Fixed markdown tests for new html logic
上级 e6570733
......@@ -287,9 +287,28 @@
<array>
<dict>
<key>begin</key>
<string>(?i)(^|\G)\s*(?=&lt;(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del).*&lt;/\2\s*&gt;\s*$)</string>
<string>(^|\G)\s*(&lt;!--)</string>
<key>end</key>
<string>$</string>
<string>(--&gt;)</string>
<key>contentName</key>
<string>block.comment.html</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.html</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.html</string>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>(^|\G)\s*(?=&lt;/?(address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|pre|p|param|script|section|source|style|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(\s|$|/?&gt;))</string>
<key>patterns</key>
<array>
<dict>
......@@ -297,10 +316,12 @@
<string>text.html.basic</string>
</dict>
</array>
<key>while</key>
<string>^(?!\s*$)</string>
</dict>
<dict>
<key>begin</key>
<string>(?i)(^|\G)\s*(?=&lt;(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del))</string>
<string>(^|\G)\s*(?=(&lt;[a-zA-Z0-9\-].*&gt;|&lt;/[a-zA-Z0-9\-]&gt;)\s*$)</string>
<key>patterns</key>
<array>
<dict>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册