mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2024-11-23 22:56:22 +01:00
Freshen generated index.js file.
This commit is contained in:
parent
be72418f16
commit
9ebbe5279e
1 changed files with 17 additions and 7 deletions
20
dist/index.js
vendored
20
dist/index.js
vendored
|
@ -6782,17 +6782,26 @@ const REPLACERS = [
|
||||||
[
|
[
|
||||||
// (a\ ) -> (a )
|
// (a\ ) -> (a )
|
||||||
// (a ) -> (a)
|
// (a ) -> (a)
|
||||||
|
// (a ) -> (a)
|
||||||
// (a \ ) -> (a )
|
// (a \ ) -> (a )
|
||||||
/\\?\s+$/,
|
/((?:\\\\)*?)(\\?\s+)$/,
|
||||||
match => match.indexOf('\\') === 0
|
(_, m1, m2) => m1 + (
|
||||||
|
m2.indexOf('\\') === 0
|
||||||
? SPACE
|
? SPACE
|
||||||
: EMPTY
|
: EMPTY
|
||||||
|
)
|
||||||
],
|
],
|
||||||
|
|
||||||
// replace (\ ) with ' '
|
// replace (\ ) with ' '
|
||||||
|
// (\ ) -> ' '
|
||||||
|
// (\\ ) -> '\\ '
|
||||||
|
// (\\\ ) -> '\\ '
|
||||||
[
|
[
|
||||||
/\\\s/g,
|
/(\\+?)\s/g,
|
||||||
() => SPACE
|
(_, m1) => {
|
||||||
|
const {length} = m1
|
||||||
|
return m1.slice(0, length - length % 2) + SPACE
|
||||||
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
// Escape metacharacters
|
// Escape metacharacters
|
||||||
|
@ -7020,7 +7029,8 @@ const makeRegex = (pattern, ignoreCase) => {
|
||||||
|
|
||||||
if (!source) {
|
if (!source) {
|
||||||
source = REPLACERS.reduce(
|
source = REPLACERS.reduce(
|
||||||
(prev, current) => prev.replace(current[0], current[1].bind(pattern)),
|
(prev, [matcher, replacer]) =>
|
||||||
|
prev.replace(matcher, replacer.bind(pattern)),
|
||||||
pattern
|
pattern
|
||||||
)
|
)
|
||||||
regexCache[pattern] = source
|
regexCache[pattern] = source
|
||||||
|
|
Loading…
Reference in a new issue