@markuplint/parser-utils
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -1,1 +0,1 @@ | ||
export declare const MASK_CHAR = "\uE000"; | ||
export declare const MASK_CHAR = '\uE000'; |
export declare type Code = { | ||
type: string; | ||
index: number; | ||
startTag: string; | ||
taggedCode: string; | ||
endTag: string | null; | ||
type: string; | ||
index: number; | ||
startTag: string; | ||
taggedCode: string; | ||
endTag: string | null; | ||
}; | ||
export declare type IgnoreTag = { | ||
type: string; | ||
start: RegExp; | ||
end: RegExp; | ||
type: string; | ||
start: RegExp; | ||
end: RegExp; | ||
}; | ||
export declare type IgnoreBlock = { | ||
source: string; | ||
replaced: string; | ||
stack: Code[]; | ||
source: string; | ||
replaced: string; | ||
stack: Code[]; | ||
}; |
@@ -90,3 +90,5 @@ "use strict"; | ||
return attributes.map(n => { | ||
const r = [tokenDebug(n)]; | ||
const r = [ | ||
tokenDebug(Object.assign(Object.assign({}, n), { name: n.type === 'html-attr' ? n.name.raw : n.raw })), | ||
]; | ||
if (n.type === 'html-attr') { | ||
@@ -108,2 +110,5 @@ r.push(` ${tokenDebug(n.spacesBeforeName, 'bN')}`); | ||
} | ||
if (n.type === 'html-attr' && n.candidate) { | ||
r.push(` candidate: ${visibleWhiteSpace(n.candidate)}`); | ||
} | ||
return r; | ||
@@ -124,3 +129,3 @@ }); | ||
function tokenDebug(n, type = '') { | ||
return `[${n.startLine}:${n.startCol}]>[${n.endLine}:${n.endCol}](${n.startOffset},${n.endOffset})${n.nodeName || n.potentialName || n.type || type}: ${visibleWhiteSpace(n.raw)}`; | ||
return `[${n.startLine}:${n.startCol}]>[${n.endLine}:${n.endCol}](${n.startOffset},${n.endOffset})${n.nodeName || n.potentialName || n.name || n.type || type}: ${visibleWhiteSpace(n.raw)}`; | ||
} | ||
@@ -127,0 +132,0 @@ function visibleWhiteSpace(chars) { |
{ | ||
"name": "@markuplint/parser-utils", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "Utility module for markuplint parser plugin", | ||
@@ -22,6 +22,6 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"dependencies": { | ||
"@markuplint/ml-ast": "^1.3.0", | ||
"@markuplint/ml-ast": "^1.4.0", | ||
"uuid": "^8.3.2" | ||
}, | ||
"gitHead": "bc9703981245d1101cc8621bc85c056462b06cc7" | ||
"gitHead": "b0b90e206a61e48edfcad573f19f1a9df8460eb4" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
167714
465
Updated@markuplint/ml-ast@^1.4.0