mirror of
https://github.com/openai/codex.git
synced 2026-10-19 16:17:49 +00:00
## Why Parsing multiple tag delimiters in a chunk repeatedly drained the pending buffer, shifting its remaining contents after each delimiter. ## What changed Track a consumed offset in `InlineHiddenTagParser::push_str` and drain the buffer once after processing the chunk, preserving partial delimiters for the next chunk. ## Testing Add a regression test comparing visible text and extracted tags against single-chunk parsing at every UTF-8 character boundary. The input covers non-ASCII text and delimiters, adjacent tags, an empty tag, and an unfinished tag at end of input. GitOrigin-RevId: 18bfbfdb81060ffda30901d5cb82ee5804878b09