Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

streaming search: fix diff result highlighting #19543

Merged
merged 2 commits into from
Mar 30, 2021
Merged

Conversation

limitedmage
Copy link
Contributor

@limitedmage limitedmage commented Mar 29, 2021

Fixes #19403

Decided to go with a front-end only solution because we still need the full Markdown code indicators to determine file type for SearchResultMatch.tsx to know the contents are code and what type of code they are for syntax highlighting.

There could be loads of ways to improve this in the future but this was the quickest relatively-clean solution to fix this bug now. In the future, SearchResultMatch.tsx could know that this is a diff/commit result and treat it in a more specialized way. Also, search results could be returned already syntax-highlighted so we don't have to call another API to get the highlighted code.

Also fixes font color for search results without syntax highlighting (eg. type:commit)

@limitedmage limitedmage requested review from stefanhengl and a team March 29, 2021 21:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diff highlighting broken (looks streaming search related)
2 participants