OhMyBug

input/serialization

Delimiters counted instead of parsed

rare10 sightingsfirst seen September 2026

What goes wrong

A scanner finds the end of a construct by counting opening and closing delimiters, with no idea which of them sit inside a string, an escape or a nested literal. The reader relies on the count reaching zero exactly at the true end, so the span closes early or swallows everything that follows.

Example

A template helper ends an embedded expression at the first closing brace, so an expression holding a brace inside a nested literal is cut short and the lines below it are absorbed into it.

Not to be confused with

Not Indirect check misses the real property, which uses a proxy to reach a verdict; here the proxy is a scanning rule, and its error moves the boundary of a parsed span rather than the outcome of a check.

Discovered by

Field notes · 4