mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Expose shared.js helper code for custom rule authors (fixes #134).
This commit is contained in:
parent
f614f3e1ce
commit
7e980401b8
52 changed files with 283 additions and 184 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
const shared = require("./shared");
|
||||
const { addErrorContext } = require("../helpers");
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD036", "no-emphasis-as-heading", "no-emphasis-as-header" ],
|
||||
|
|
@ -24,7 +24,7 @@ module.exports = {
|
|||
(children[0].type === "em_open")) &&
|
||||
(children[1].type === "text") &&
|
||||
!re.test(children[1].content)) {
|
||||
shared.addErrorContext(onError, t.lineNumber,
|
||||
addErrorContext(onError, t.lineNumber,
|
||||
children[1].content);
|
||||
}
|
||||
return base;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue