mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-21 08:20:12 +01:00
Fix issue in MD020/no-missing-space-closed-atx that reported errors for single-character headers (fixes #229).
This commit is contained in:
parent
31ffe52f0f
commit
84b6d935f5
2 changed files with 84 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ module.exports = {
|
|||
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
||||
if (!inCode) {
|
||||
const match =
|
||||
/^(#+)(\s*)([^#]+?[^#\\])(\s*)((?:\\#)?)(#+)(\s*)$/.exec(line);
|
||||
/^(#+)(\s*)([^#]*?[^#\\])(\s*)((?:\\#)?)(#+)(\s*)$/.exec(line);
|
||||
if (match) {
|
||||
const [
|
||||
,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue