mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
chore: fix lint
This commit is contained in:
parent
63975aa75b
commit
5500b51800
11 changed files with 171 additions and 3 deletions
|
|
@ -120,6 +120,14 @@ def mdx_escape_body(body: str) -> str:
|
|||
elif ch == "}":
|
||||
out.append("}")
|
||||
elif ch == "<":
|
||||
# Preserve full HTML comments (e.g. ascii-guard ignore markers) — they
|
||||
# are not HTML tags, so the tag regex below would escape the leading <.
|
||||
if text[i:].startswith("<!--"):
|
||||
end = text.find("-->", i)
|
||||
if end != -1:
|
||||
out.append(text[i : end + 3])
|
||||
i = end + 3
|
||||
continue
|
||||
# Look ahead to see if this is a valid HTML-ish tag.
|
||||
# If it looks like a tag name then alnum/-/_ chars, leave it.
|
||||
# Otherwise escape.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue