wikilint 2.1.2 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/heading.js +4 -5
- package/package.json +1 -1
package/dist/src/heading.js
CHANGED
|
@@ -55,19 +55,18 @@ class HeadingToken extends index_1.Token {
|
|
|
55
55
|
}
|
|
56
56
|
/** @override */
|
|
57
57
|
lint(start = this.getAbsoluteIndex()) {
|
|
58
|
-
const errors = super.lint(start), innerStr = String(
|
|
58
|
+
const errors = super.lint(start), { firstChild } = this, innerStr = String(firstChild);
|
|
59
59
|
let refError;
|
|
60
60
|
if (this.level === 1) {
|
|
61
|
-
refError = (0, lint_1.
|
|
61
|
+
refError = (0, lint_1.generateForChild)(firstChild, { start }, '<h1>');
|
|
62
62
|
errors.push(refError);
|
|
63
63
|
}
|
|
64
64
|
if (innerStr.startsWith('=') || innerStr.endsWith('=')) {
|
|
65
|
-
refError ??= (0, lint_1.
|
|
65
|
+
refError ??= (0, lint_1.generateForChild)(firstChild, { start }, '');
|
|
66
66
|
errors.push({ ...refError, message: Parser.msg('unbalanced "=" in a section header') });
|
|
67
67
|
}
|
|
68
68
|
if (this.closest('html-attrs, table-attrs')) {
|
|
69
|
-
|
|
70
|
-
errors.push({ ...refError, message: Parser.msg('section header in a HTML tag') });
|
|
69
|
+
errors.push({ ...(0, lint_1.generateForSelf)(this, { start }, ''), message: Parser.msg('section header in a HTML tag') });
|
|
71
70
|
}
|
|
72
71
|
return errors;
|
|
73
72
|
}
|