mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Remove the use of "||=" which is not supported by Node 14 (and hidden by setup-node failing to configure Node 14 for CI workflow).
This commit is contained in:
parent
13ced64c21
commit
0c48b4b032
2 changed files with 4 additions and 4 deletions
|
|
@ -31,7 +31,7 @@ const {
|
|||
function getMicromarkEvents(markdown, options = {}) {
|
||||
|
||||
// Customize options object to add useful extensions
|
||||
options.extensions ||= [];
|
||||
options.extensions = options.extensions || [];
|
||||
options.extensions.push(gfmAutolinkLiteral, gfmFootnote(), gfmTable);
|
||||
|
||||
// Use micromark to parse document into Events
|
||||
|
|
@ -182,7 +182,7 @@ function matchAndGetTokensByType(tokens, matchTypes, resultTypes) {
|
|||
if (tokens.length !== matchTypes.length) {
|
||||
return null;
|
||||
}
|
||||
resultTypes ||= matchTypes;
|
||||
resultTypes = resultTypes || matchTypes;
|
||||
const result = [];
|
||||
// eslint-disable-next-line unicorn/no-for-loop
|
||||
for (let i = 0; i < matchTypes.length; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue