From 050cbbba82249d5a57de01dc1076d0b20271b9cd Mon Sep 17 00:00:00 2001 From: David Anson Date: Wed, 13 Mar 2019 21:39:15 -0700 Subject: [PATCH] Add name first-line-heading to MD041 for clarity (refs #169). --- README.md | 2 +- doc/Rules.md | 2 +- lib/md041.js | 2 +- test/detailed-results-MD041-MD050.results.json | 2 +- test/detailed-results-front-matter.results.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 649df005..f92e01ba 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ playground for learning and exploring. * **[MD038](doc/Rules.md#md038)** *no-space-in-code* - Spaces inside code span elements * **[MD039](doc/Rules.md#md039)** *no-space-in-links* - Spaces inside link text * **[MD040](doc/Rules.md#md040)** *fenced-code-language* - Fenced code blocks should have a language specified -* **[MD041](doc/Rules.md#md041)** *first-line-h1* - First line in file should be a top level heading +* **[MD041](doc/Rules.md#md041)** *first-line-heading/first-line-h1* - First line in file should be a top level heading * **[MD042](doc/Rules.md#md042)** *no-empty-links* - No empty links * **[MD043](doc/Rules.md#md043)** *required-headings/required-headers* - Required heading structure * **[MD044](doc/Rules.md#md044)** *proper-names* - Proper names should have the correct capitalization diff --git a/doc/Rules.md b/doc/Rules.md index e7ad7fc9..aff9a2f0 100644 --- a/doc/Rules.md +++ b/doc/Rules.md @@ -1348,7 +1348,7 @@ echo Hello world Tags: headings, headers -Aliases: first-line-h1 +Aliases: first-line-heading, first-line-h1 Parameters: level, front_matter_title (number; default 1, string; default "^\s*title:") diff --git a/lib/md041.js b/lib/md041.js index 484755ee..560d0fee 100644 --- a/lib/md041.js +++ b/lib/md041.js @@ -5,7 +5,7 @@ const shared = require("./shared"); module.exports = { - "names": [ "MD041", "first-line-h1" ], + "names": [ "MD041", "first-line-heading", "first-line-h1" ], "description": "First line in file should be a top level heading", "tags": [ "headings", "headers" ], "function": function MD041(params, onError) { diff --git a/test/detailed-results-MD041-MD050.results.json b/test/detailed-results-MD041-MD050.results.json index 34e24d5d..f405fc6c 100644 --- a/test/detailed-results-MD041-MD050.results.json +++ b/test/detailed-results-MD041-MD050.results.json @@ -1,7 +1,7 @@ [ { "lineNumber": 1, - "ruleNames": [ "MD041", "first-line-h1" ], + "ruleNames": [ "MD041", "first-line-heading", "first-line-h1" ], "ruleDescription": "First line in file should be a top level heading", "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md041", "errorDetail": null, diff --git a/test/detailed-results-front-matter.results.json b/test/detailed-results-front-matter.results.json index cfbae253..42f92c43 100644 --- a/test/detailed-results-front-matter.results.json +++ b/test/detailed-results-front-matter.results.json @@ -10,7 +10,7 @@ }, { "lineNumber": 4, - "ruleNames": [ "MD041", "first-line-h1" ], + "ruleNames": [ "MD041", "first-line-heading", "first-line-h1" ], "ruleDescription": "First line in file should be a top level heading", "ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md041", "errorDetail": null,