Fix two issues with ATX header syntax
diff --git a/pkgs/markdown/lib/src/block_parser.dart b/pkgs/markdown/lib/src/block_parser.dart index 65d78ba..5a92064 100644 --- a/pkgs/markdown/lib/src/block_parser.dart +++ b/pkgs/markdown/lib/src/block_parser.dart
@@ -16,7 +16,7 @@ /// /// Starts with 1-6 unescaped `#` characters which must not be followed by a /// non-space character. Line may end with any number of `#` characters,. -final _headerPattern = new RegExp(r'^(#{1,6})[ \x09\x0b\x0c](.*?)#*$'); +final _headerPattern = new RegExp(r'^ {0,3}(#{1,6})[ \x09\x0b\x0c](.*?)#*$'); /// The line starts with `>` with one optional space after. final _blockquotePattern = new RegExp(r'^[ ]{0,3}>[ ]?(.*)$');
diff --git a/pkgs/markdown/tool/common_mark_stats.json b/pkgs/markdown/tool/common_mark_stats.json index bfa5c58..bc14b36 100644 --- a/pkgs/markdown/tool/common_mark_stats.json +++ b/pkgs/markdown/tool/common_mark_stats.json
@@ -6,10 +6,10 @@ "35": "strict", "36": "strict", "37": "strict", - "38": "fail", + "38": "strict", "39": "strict", "40": "loose", - "41": "fail", + "41": "strict", "42": "strict", "43": "loose", "44": "strict",
diff --git a/pkgs/markdown/tool/common_mark_stats.txt b/pkgs/markdown/tool/common_mark_stats.txt index b854444..1d005a5 100644 --- a/pkgs/markdown/tool/common_mark_stats.txt +++ b/pkgs/markdown/tool/common_mark_stats.txt
@@ -1,4 +1,4 @@ - 15 of 18 – 83.3% ATX headings + 17 of 18 – 94.4% ATX headings 19 of 19 – 100.0% Autolinks 9 of 13 – 69.2% Backslash escapes 1 of 1 – 100.0% Blank lines @@ -24,4 +24,4 @@ 6 of 11 – 54.5% Tabs 3 of 3 – 100.0% Textual content 17 of 19 – 89.5% Thematic breaks - 504 of 624 – 80.8% TOTAL + 506 of 624 – 81.1% TOTAL