mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-05-30 14:28:19 +08:00
Add option to disable ambiguous unicode characters detection (#28454)
* Close #24483 * Close #28123 * Close #23682 * Close #23149 (maybe more)
This commit is contained in:
@ -93,10 +93,10 @@ func (hcd *highlightCodeDiff) diffWithHighlight(filename, language, codeA, codeB
|
||||
highlightCodeA, _ := highlight.Code(filename, language, codeA)
|
||||
highlightCodeB, _ := highlight.Code(filename, language, codeB)
|
||||
|
||||
highlightCodeA = hcd.convertToPlaceholders(highlightCodeA)
|
||||
highlightCodeB = hcd.convertToPlaceholders(highlightCodeB)
|
||||
convertedCodeA := hcd.convertToPlaceholders(string(highlightCodeA))
|
||||
convertedCodeB := hcd.convertToPlaceholders(string(highlightCodeB))
|
||||
|
||||
diffs := diffMatchPatch.DiffMain(highlightCodeA, highlightCodeB, true)
|
||||
diffs := diffMatchPatch.DiffMain(convertedCodeA, convertedCodeB, true)
|
||||
diffs = diffMatchPatch.DiffCleanupEfficiency(diffs)
|
||||
|
||||
for i := range diffs {
|
||||
|
Reference in New Issue
Block a user