mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Reimplement MD049/emphasis-style, MD050/strong-style to use micromark parser (with smaller ranges and handling of multi-line fixes).
This commit is contained in:
parent
e1233aad4b
commit
7005a8a438
9 changed files with 1211 additions and 348 deletions
|
@ -3,7 +3,7 @@
|
|||
"use strict";
|
||||
|
||||
const { addErrorContext } = require("../helpers");
|
||||
const { filterByTypes } = require("../helpers/micromark.cjs");
|
||||
const { filterByTypes, tokenIfType } = require("../helpers/micromark.cjs");
|
||||
|
||||
const leftSpaceRe = /^\s(?:[^`]|$)/;
|
||||
const rightSpaceRe = /[^`]\s$/;
|
||||
|
@ -17,7 +17,6 @@ const trimCodeText = (text, start, end) => {
|
|||
}
|
||||
return text;
|
||||
};
|
||||
const tokenIfType = (token, type) => token && (token.type === type) && token;
|
||||
|
||||
module.exports = {
|
||||
"names": [ "MD038", "no-space-in-code" ],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue