mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
Backport #39616 by @SergioBenitez Editing a comment as follows: ```diff # Deployment checklist - Timeout: 30 seconds. + Timeout: 60 seconds. Restart the worker before deploying. Check the logs after deployment. ``` Gitea would render the history this way, before, inserting spurious new lines: <img width="1280" height="720" alt="before" src="https://github.com/user-attachments/assets/5391167b-ac04-4746-b544-add926230ad8" /> With this change, it now renders it like this: <img width="1280" height="720" alt="after" src="https://github.com/user-attachments/assets/369f1f19-0eaf-4da5-99e5-aeedbac6050c" /> Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Sergio Benitez <SergioBenitez@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
18 lines
394 B
Go
18 lines
394 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package repo
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestDiffContentHistory(t *testing.T) {
|
|
out := diffContentHistory("<\r\n&\r\n>", "<\nXXX\n>")
|
|
assert.Equal(t, `<pre class="chroma"><
|
|
<span class="gd">&</span><span class="gi">XXX</span>
|
|
></pre>`, string(out))
|
|
}
|