GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||
GeezerVison is showing github.com — [REQUEST] Make the special-tag parser code-span aware, and delete the backtick sanitizer · Issue #6001 · simstudioai/sim Open Labels featureNew feature or requestNew feature or request DescriptionIs your feature request related to a problem? Please describe.
So the sanitizer is not really about backticks. It is cleaning up after a decision the parser already made, using a weaker signal than the parser had. To do that it has to re-derive "is this a real tag" from backtick adjacency, and that guess is where the bugs come from. This produced four separate corruption bugs on #5952, each one a fix for the last:
Plus a quadratic (154ms per call at 168KB, on the main thread, per streamed chunk) introduced while fixing the first one. All are fixed as of #5952, and the three patterns are now one left-to-right pass. But the recurrence is the point: four arrangements, each correct for the cases it was written for, each breaking a different one. Two independent reviewers on that PR flagged it as an altitude problem rather than a run of bad luck. Describe the solution you'd like Move the decision into the parser and delete the sanitizer's tag handling. If a tag sits inside an inline code span, the model is showing syntax, not referencing a resource. Honour that: do not extract the tag at all — render the span as code, tag text and all.
Nothing then touches backticks, so there are none to unbalance. Every shape in the table above stops being fixed and becomes impossible. It also removes the second, weaker notion of "what a tag looks like" — the parser already knows exactly where each tag begins and ends. It fixes an asymmetry too: the sanitizer only knows The hard part, so it is not a surprise: mid-stream, "am I inside a code span" is undecidable in exactly the way "will this tag close" is. That opening backtick may close after the tag, or may be an unpaired stray. Either guess retracts on the other case:
The second is the safer guess and matches what the parser already does with its Accepted behaviour change: a real tag that the model wrapped in backticks stops rendering a chip and renders as code. That is the intended semantics of this change rather than a regression — the model asked for code — but it is a visible difference worth agreeing on before starting. Describe alternatives you've considered
Additional context Depends on a prerequisite that is worth doing on its own: Suggested order:
The groundwork for step 2 is already in place. #5952 added four property invariants over generated messages — no character lost, every valid tag renders whatever surrounds it, no card un-renders and no text retracts across streamed frames, and the settled parse never shows less than the last streaming frame. Those are exactly the invariants a code-span-aware streaming parser must not violate, and each was validated by reverting a real bug and confirming the property catches it. Characterize first, restructure second — the characterization is done. Relevant code: Activity
MetadataMetadataAssigneesLabelsfeatureNew feature or requestNew feature or request TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | |||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |