@markuplint/parser-utils
Advanced tools
Comparing version 3.0.0-alpha.4 to 3.0.0-alpha.5
@@ -6,3 +6,3 @@ "use strict"; | ||
function detectElementType(name, option, defaultPattern) { | ||
if (distinguishAutoredName(name, option, defaultPattern)) { | ||
if (distinguishAuthoredName(name, option, defaultPattern)) { | ||
return 'authored'; | ||
@@ -13,12 +13,12 @@ } | ||
exports.detectElementType = detectElementType; | ||
function distinguishAutoredName(name, pattern, defaultPattern) { | ||
function distinguishAuthoredName(name, pattern, defaultPattern) { | ||
if (pattern) { | ||
return _distinguishAutoredName(name, pattern); | ||
return _distinguishAuthoredName(name, pattern); | ||
} | ||
if (defaultPattern) { | ||
return _distinguishAutoredName(name, defaultPattern); | ||
return _distinguishAuthoredName(name, defaultPattern); | ||
} | ||
return false; | ||
} | ||
function _distinguishAutoredName(name, patterns) { | ||
function _distinguishAuthoredName(name, patterns) { | ||
const patternList = Array.isArray(patterns) ? patterns : [patterns]; | ||
@@ -25,0 +25,0 @@ return patternList.some(pattern => { |
{ | ||
"name": "@markuplint/parser-utils", | ||
"version": "3.0.0-alpha.4", | ||
"version": "3.0.0-alpha.5", | ||
"description": "Utility module for markuplint parser plugin", | ||
@@ -22,8 +22,8 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"dependencies": { | ||
"@markuplint/ml-ast": "3.0.0-alpha.4", | ||
"@markuplint/types": "3.0.0-alpha.4", | ||
"@markuplint/ml-ast": "3.0.0-alpha.5", | ||
"@markuplint/types": "3.0.0-alpha.5", | ||
"tslib": "^2.4.0", | ||
"uuid": "8" | ||
}, | ||
"gitHead": "04fdbb677c6893de3d16613ddcd112de25dc55db" | ||
"gitHead": "d2ee395d917cb69b91dedb0262b1c12ddc81fb58" | ||
} |
Sorry, the diff of this file is not supported yet
94446
+ Added@markuplint/ml-ast@3.0.0-alpha.5(transitive)
+ Added@markuplint/types@3.0.0-alpha.5(transitive)
- Removed@markuplint/ml-ast@3.0.0-alpha.4(transitive)
- Removed@markuplint/types@3.0.0-alpha.4(transitive)