Update MD018/MD019/MD020/MD021 to look specifically for "space" characters (space or tab) instead of RegExp's "\s" characters per CommonMark specification (fixes #367).

This commit is contained in:
David Anson 2021-02-03 22:05:07 -08:00
parent d2d4b310b9
commit 5aef3a4a51
6 changed files with 50 additions and 8 deletions

View file

@ -0,0 +1,42 @@
# Headings with invalid spaces
## Normal space
##  Normal outer non-breaking inner space
## Non-breaking space {MD018}
## Tab
## Normal space (both) ##
##  Normal outer non-breaking inner space (both)  ##
## Non-breaking space (left) {MD020} ##
## Tab (left) ##
## Non-breaking space (right) {MD020} ##
## Tab (right) ##
## Extra normal space {MD019}
##  Extra non-breaking space {MD018}
## Extra Tab {MD019}
## Extra Normal space (both) {MD021} ##
##  Extra non-breaking space (left) {MD020} ##
## Extra tab (left) {MD021} ##
## Extra non-breaking space (right) {MD020}  ##
## Extra tab (right) {MD021} ##
<!-- markdownlint-configure-file {
"heading-style": false,
"no-hard-tabs": false
} -->