0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-04 18:56:28 +02:00

4 Commits

Author SHA1 Message Date
silverwind
f80593bb23 Extract shared ControlCharPicture helper and improve badge styling
Extract charset.ControlCharPicture() shared between highlight and
charset escape paths. Add controlCharHTML helper to deduplicate HTML
template. Style control char badges with body color on gray background
matching the original styling.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
2026-04-03 10:19:55 +02:00
silverwind
ec90482206
Fix broken-code-point positioning and comment
Add position: relative to .broken-code-point[data-escaped] to establish
a containing block for the absolutely positioned .char child. Anchor
the child with left: 0. Replace AI-referencing comment with description
of actual purpose.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
2026-04-03 10:04:20 +02:00
silverwind
1e96a85f1b
Use Unicode Control Pictures for control character display
Render ASCII control characters (0x00-0x1F, 0x7F) as Unicode Control
Pictures (U+2400-U+2421) instead of text abbreviations like [DEL] or
[U+001E]. This applies to both the file view and diff view paths.
Also style control char badges in red without background, matching
the style of other escaped code points.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
2026-04-03 10:04:20 +02:00
wxiaoguang
6eed75af24
Refactor code render and render control chars (#37078)
Fix #37057
2026-04-02 21:10:01 -07:00