GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(client): a long run of fence markers is read in one pass by juliusmarminge · Pull Request #41983 · pingdotgg/t3code

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 24, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Deciding that a line starting with fence markers is not a code fence re-read the rest of the line once per marker character. This makes that decision a single pass.

The fence pattern now takes the whole marker run as the marker, so a line that turns out not to be a fence is given up on after one pass. Which lines count as fences, and what is read as the marker and the info string, is unchanged.

Testing

  • Added a row to the existing "splits … in one pass" table in pullRequestMarkdown.test.ts: 100,000 backticks followed by a line separator. Without the change the row runs past the test timeout (about 45 s on my machine); with it the whole file passes in well under a second of test time. The existing fence tests are untouched and pass.
  • Compared the old and new pattern on every line of up to 7 characters over backtick, tilde, space, tab, a letter, carriage return and U+2028 (960,800 lines): same match and same groups on all of them.
  • Timed the new pattern alone in Node on 100k, 400k, 1.6M and 6.4M backticks: 0.5, 1.9, 7.2 and 29 ms.
  • vp run check:changed passes.

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@juliusmarminge @claude
fix(client): a long run of fence markers is read in one pass
4a10ff3
A line that starts with a fence marker but is not a fence, because a
line separator or a lone carriage return follows on the same line, was
re-read once per marker character. The marker now always covers the
whole run, so such a line is given up on after one pass. Which lines
count as fences is unchanged.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Nov 24, 2026
@juliusmarminge
juliusmarminge merged commit bb0862e into main Nov 24, 2026
39 of 40 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge
juliusmarminge deleted the t3code/fence-line-scan branch November 24, 2026 07:20
@patroza patroza mentioned this pull request Nov 24, 2026
Merge upstream main through 2fe7febc8d73 patroza/t3code#671
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — 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.