Skip to content

content: Add support for keyword highlighting in code blocks #1707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rajveermalviya
Copy link
Member

@rajveermalviya rajveermalviya commented Jul 16, 2025

Fixes: #1695

Screenshots when commits based on top of #1694:

Flutter Web
image image

But only allowing a single element for now, making the diff for
content tests simpler for the later commit which implements support
for multiple span types.

Also better formatting for code block HTML in content tests.
The code block spans with `hll` (and `highlight` used for search
keyword highlighting) classes can be nested inside other types of
code block spans. So add support for parsing those types of spans.

The rendered text style will be result of merging all the
corresponding `TextStyle` using `TextStyle.merge`, preserving the
order of those nested spans.
@rajveermalviya rajveermalviya force-pushed the pr-codeblock-highlight branch from c79bf5b to 2c8fe02 Compare July 17, 2025 01:15
@rajveermalviya
Copy link
Member Author

Changed the base from #1694 to main as it doesn't really depend on it, and can be reviewed independently.

@rajveermalviya rajveermalviya added the integration review Added by maintainers when PR may be ready for integration label Jul 17, 2025
@rajveermalviya rajveermalviya requested a review from gnprice July 17, 2025 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration review Added by maintainers when PR may be ready for integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

search: Highlight keyword matches in code blocks
2 participants