feat: highlighted code search results (#4749)
closes #4534 <details> <summary>Screenshots</summary>  </details> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4749 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Co-authored-by: Shiny Nematoda <snematoda.751k2@aleeas.com> Co-committed-by: Shiny Nematoda <snematoda.751k2@aleeas.com>
This commit is contained in:
parent
517637137c
commit
06d2e90fa4
10 changed files with 214 additions and 75 deletions
|
@ -337,7 +337,7 @@ func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine, loc
|
|||
return DiffInlineWithHighlightCode(diffSection.FileName, language, diffLine.Content, locale)
|
||||
}
|
||||
|
||||
hcd := newHighlightCodeDiff()
|
||||
hcd := NewHighlightCodeDiff()
|
||||
diffRecord := hcd.diffWithHighlight(diffSection.FileName, language, diff1[1:], diff2[1:])
|
||||
// it seems that Gitea doesn't need the line wrapper of Chroma, so do not add them back
|
||||
// if the line wrappers are still needed in the future, it can be added back by "diffToHTML(hcd.lineWrapperTags. ...)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue