Skip to content

Syntax highlighter: format every match on a line - #294

Open
enriquevelmai wants to merge 1 commit into
nxt-dev:devfrom
enriquevelmai:feature/syntax-globalmatch
Open

enriquevelmai wants to merge 1 commit into
nxt-dev:devfrom
enriquevelmai:feature/syntax-globalmatch

Conversation

@enriquevelmai

Copy link
Copy Markdown

The highlighter loop only formatted the first match of each rule per line (capturedStart(text) returned -1 after the first hit). This iterates matches with globalMatch so all keywords, operators, strings and ${} tokens on a line get highlighted. Nested-token handling is unchanged, just computed once per block.

Iterate matches with QRegularExpression.globalMatch instead of re-running
match() from the start of the line, which stopped after the first hit.
The nested ${} extra-char logic is computed once per block.
@wyoder

wyoder commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@enriquevelmai thank you for the PR. You're a busy person. We really appreciate it. We will take a look against our latest updates and respond here and let you know about the updates asap. Thanks for your patience.

@wyoder
wyoder self-requested a review September 24, 2026 15:00

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants