This commit is contained in:
CJACK
2026-03-29 19:49:52 +08:00
parent 621599f8ad
commit c3c644ff8c
2 changed files with 21 additions and 2 deletions

View File

@@ -116,8 +116,11 @@ function flushToolSieve(state, toolNames) {
events.push({ type: 'text', text: consumed.suffix });
}
} else if (state.capture) {
noteText(state, state.capture);
events.push({ type: 'text', text: state.capture });
const content = state.capture;
if (!hasOpenXMLToolTag(content) && !looksLikeXMLToolTagFragment(content)) {
noteText(state, content);
events.push({ type: 'text', text: content });
}
}
state.capture = '';
state.capturing = false;