Skip to content

Commit 119a3be

Browse files
committed
fix: anchor reasoning tag detection to line start
1 parent 83709f2 commit 119a3be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/open_webui/utils/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3309,7 +3309,7 @@ def set_last_text(out, text):
33093309
if start_tag.startswith('<') and start_tag.endswith('>'):
33103310
start_tag_pattern = rf'<{re.escape(start_tag[1:-1])}(\s.*?)?>'
33113311

3312-
match = re.search(start_tag_pattern, item_text)
3312+
match = re.search(rf'(?m)^[ \t]*{start_tag_pattern}', item_text)
33133313
if match:
33143314
try:
33153315
attr_content = match.group(1) if match.group(1) else ''

0 commit comments

Comments
 (0)