Repository navigation
Conversation
Contributor
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.
Summary
Follow-up to #1210. Some opening fences put the wrong thing in the code block's language, or lost their title:
``` title="routes/web.php", usedtitle="routes/web.php"as its label and had no filename.```js{2}(the VitePress and Gatsby style), keptjs{2}as the language, so the block wasn't highlighted and the label showedjs{2}.```php title='app/Models/User.php', was ignored.Now the first block shows
routes/web.php, also in quoted commits and notifications, the second is highlighted asjs, and the third showsapp/Models/User.php.Changes
CodeSpansreads the whole info string with the same tokens as before (key="value"pairs,{…}ranges, bare words), pluskey='value'pairs, and{now ends a bare word. The language is the first token only when it's a bare word.lib/code.tsmirrors it, and both sides are tested with the same cases.CodeBlockkeeps its header for a block with a filename but no language in excerpts, where there's no copy button.Validation
Local, on
f6cd14b9(based ona4670abe):composer test:lintandcomposer test:typespass, type coverage is 100%.composer test:unitpasses: Pest 4,968 tests at 100% coverage, and every Node and.tsxunit test.production. The rows for an apostrophe inside double quotes and for an empty or unclosed single-quoted title are guards and pass on both.Visual evidence
Guest view of the same demo commit in Chrome (2x),
production(a4670abe) vs this branch.1366×650: light before · light after · dark before · dark after
Quoted excerpt of a block with only a title:
Its other viewports and themes are on the assets branch.
Device verification
No mobile interaction changes, only a label and highlighting. 390×844 was checked with viewport emulation in Chrome, not on hardware or a simulator.
Independent review
A separate, read-only reviewer agent (given the task, #1210, the repo guidelines, the diff and these captures) returned CODE: PASS and VISUAL: PASS for
a4670abe..f6cd14b9, mediab2c285a9, after parity runs of 120,134 fuzzed and real-world fences (c++,f#,js:line-numbers,ts twoslash, mixed quotes and more) with 0 mismatches. It confirmed the feature tests fail onproductionand the guard rows pass on both. Nested fences (#1227) were checked by reading the code, since only the opening line is parsed.Limitations
```{r}used to show{r}as the label and now show none. Neither was highlighted.Summary by CodeRabbit