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 — fix(tui): highlight PHP blocks that do not open with <?php by Dopetaiga · Pull Request #58712 · anomalyco/opencode ConversationFixes #58664 ProblemThe TUI shows PHP code blocks as plain text unless the snippet starts with FixPoint the PHP parser entry at the upstream
One URL change plus the rationale comment; the query source is untouched. Verification (local, driving
|
| parser | block without <?php |
block with <?php |
|---|---|---|
tree-sitter-php.wasm (current) |
0 — the reported bug | 7 |
tree-sitter-php_only.wasm (fix) |
16 | 7 |
packages/tui typecheck (bun 1.4.4): no type errors across the package's projects.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The PHP grammar parses anything outside <?php ... ?> as plain text nodes, so a code block without the opening tag — how models usually emit short PHP excerpts — produced zero highlightable nodes. Point the PHP entry at the php_only wasm variant, which treats the whole document as PHP; the bundled highlights query references no text or program nodes, and blocks that do open with <?php highlight identically under either parser.
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 72 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for the fix and for measuring the highlight ranges before and after, @Dopetaiga! I think this duplicates #58675, which is already open for #58664 and makes the same switch to One difference may matter: #58675 also replaces the highlights query with nvim-treesitter's |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
tui: PHP code blocks without<?php are not syntax highlighted
There was an error while loading. Please reload this page.