Skip to content

Commit

Permalink
Merge branch 'noprint' into lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed Aug 24, 2024
2 parents 975a667 + aaf9348 commit 9dc17d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/transclude.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
removeComment,
text,
decodeHtml,
} from '../util/string';
import {generateForChild, generateForSelf} from '../util/lint';
import {isToken, Shadow} from '../util/debug';
Expand Down Expand Up @@ -235,7 +236,9 @@ export abstract class TranscludeToken extends Token {
errors.push(generateForChild(childNodes[1], rect, 'invalid-invoke', 'illegal module name'));
} else {
const child = childNodes[invoke ? 1 : 0] as AtomToken,
textNode = child.childNodes.find((c): c is AstText => c.type === 'text' && c.data.includes('#'));
textNode = child.childNodes.find(
(c): c is AstText => c.type === 'text' && decodeHtml(c.data).includes('#'),
);
if (textNode) {
const e = generateForChild(child, rect, 'no-ignored', 'useless fragment');
e.fix = {
Expand Down

0 comments on commit 9dc17d9

Please sign in to comment.