mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD018/no-missing-space-atx to ignore Keycap Number Sign emoji at start of line (fixes #257).
This commit is contained in:
parent
67d1476ed8
commit
b87094e33d
2 changed files with 27 additions and 1 deletions
|
@ -11,7 +11,10 @@ module.exports = {
|
|||
"tags": [ "headings", "headers", "atx", "spaces" ],
|
||||
"function": function MD018(params, onError) {
|
||||
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
||||
if (!inCode && /^#+[^#\s]/.test(line) && !/#\s*$/.test(line)) {
|
||||
if (!inCode &&
|
||||
/^#+[^#\s]/.test(line) &&
|
||||
!/#\s*$/.test(line) &&
|
||||
!line.startsWith("#️⃣")) {
|
||||
const hashCount = /^#+/.exec(line)[0].length;
|
||||
addErrorContext(
|
||||
onError,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue