fix inline tags being tokenized as blocks

This commit is contained in:
evilchili committed 2026-10-21 12:30:24 -07:00
1 parent 0df3677579
commit 928cb87fa7
6 files changed
+13 -5

No files matched your search

+4 -1
View File
@@ -63,7 +63,7 @@ class Tokenizer {
const flushText = () => {
if (textBuffer.length > 0) {
tokens.push({
role: 'block',
role: 'text',
value: textBuffer,
});
textBuffer = '';
@@ -189,6 +189,9 @@ class Tokenizer {
&& (charAfter === undefined || PUNCTUATION.has(charAfter) || charAfter === '\n');
const role = leftFlanking ? 'open' : rightFlanking ? 'close' : 'block';
var token = tag.tokenize(role, sequence, source);
if (role == 'block' && !tag.isBlock) {
continue;
}
if (token) {
return token;
}