Repository navigation
fix(roadmap): refine wraps no link in the model's code, and wraps each reference and link that GitHub makes from its text - #2540
Merged
Conversation
…h reference and link that GitHub makes from its text - sanitize_text finds the code in the model's text with markdown-it-py (CommonMark with tables) and wraps no link, handle or reference in a code span or a code block. A backtick added in a code span closed it early, and GitHub linked the text after it. - An added code span takes one backtick more than the longest run in the text, so it closes on its own backticks only. A space keeps a replacement from a backtick next to it or a backslash before it. - In a text that shows a backtick as text, GitHub's parser (cmark) and markdown-it-py can take a later code span as text. There, each added code span takes a length of its own, and a link in a code span is wrapped too. - One pattern finds URLs (also ftp:// and a scheme in capitals), www. links (also after > and in a table cell), handles and owner/repo#N references (also in emphasis, after a slash, a dot or a handle), as GitHub links them. A URL ends before a backtick, |, a bracket, a parenthesis or a backslash, and an allowed link that a backtick follows before the next space goes in a code span. - Each point of a comment goes on one line before it is sanitized. - The < of <! and <? still becomes < in code: the record block and the markers are found in the raw text. Refs #2525
Owner
Author
|
Fail-to-pass: https://github.com/dan-petty/devops-cli/actions/runs/40769620051/job/123102971906 (the local replay against Other checks before the push:
Review findings of #2507:
|
dan-petty
pushed a commit
that referenced
this pull request
Oct 28, 2026
🤖 I have created a release *beep* *boop* --- ## [0.11.3](v0.11.2...v0.11.3) (2026-10-28) ### Bug Fixes * **roadmap:** refine wraps no link in the model's code, and wraps each reference and link that GitHub makes from its text ([#2540](#2540)) ([2d38f8d](2d38f8d)), closes [#2525](#2525) ### Code Refactoring * **docker:** DockerEngineService is the Docker engine seam, with an in-memory engine fake and its contract suite ([#2534](#2534)) ([1244cbf](1244cbf)), closes [#1316](#1316) * **security:** one keyring seam owns the keyring and the Secret Service, with a shared fake and its contract suite ([#2532](#2532)) ([866d2cb](866d2cb)), closes [#1318](#1318) * **telemetry:** OTLP export goes through one exporter seam, and tests read exported spans and metrics from a shared fake ([#2541](#2541)) ([8da35e6](8da35e6)), closes [#1319](#1319) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
sanitize_textinsrc/devops_cli/roadmap/refine.pynow knows which text of the model GitHub shows as code. The review of #2507 found that the patterns of #2478 added backticks inside a code span, which closed the span early and made GitHub link the text after it, and that they missed references and links that GitHub links.www.example.comlinked inA `` `x` `see www.example.com` B). There, each added code span takes a length of its own, and a link in a code span is wrapped too.ftp://and a scheme in capitals),www.links (also after>and in a table cell), handles andowner/repo#Nreferences (also in emphasis, after a slash, a dot or a handle). A URL ends before a backtick,|, a bracket, a parenthesis or a backslash. An allowed link that a backtick follows before the next space goes in a code span, because GitHub's autolink would take that backtick.<of<!and<?still becomes<in a code span, becausesplit_recordand the markers read the raw text. The design records this trade-off.The OpenSpec change
2525-refine-sanitize-code-spansis archived in the last commit.Closes #2525