mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Update code/tests with latest functionality in Ruby markdownlint.
This commit is contained in:
parent
2d8122a3be
commit
fdeeddc99d
10 changed files with 57 additions and 7 deletions
|
|
@ -781,6 +781,8 @@ module.exports = [
|
|||
"tags": [ "headers", "emphasis" ],
|
||||
"aliases": [ "no-emphasis-as-header" ],
|
||||
"func": function MD036(params, errors) {
|
||||
var punctuation = params.options.punctuation || ".,;:!?";
|
||||
var re = new RegExp("[" + punctuation + "]$");
|
||||
function base(token) {
|
||||
if (token.type === "paragraph_open") {
|
||||
return function inParagraph(t) {
|
||||
|
|
@ -788,7 +790,8 @@ module.exports = [
|
|||
(t.children.length === 3) &&
|
||||
((t.children[0].type === "strong_open") ||
|
||||
(t.children[0].type === "em_open")) &&
|
||||
(t.children[1].type === "text")) {
|
||||
(t.children[1].type === "text") &&
|
||||
!re.test(t.children[1].content)) {
|
||||
errors.push(t.lineNumber);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue