From b927386173b179d124815e366989da07a711ab3e Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 24 Oct 2026 09:17:41 -1000 Subject: Show characters a browser breaks at as escapes The HTML parser turns a carriage return with no line feed after it into a line feed, and WebKit starts a new line at U+2028 and U+2029, while git and the line numbers count line feeds alone, so each one set every later line of the tree and blame pages a line below its number. CSS Text makes vertical tab, form feed and next line forced breaks as well, though no engine honours that yet. The escapes follow gitweb, which shows control characters the same way. --- README.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'README.txt') diff --git a/README.txt b/README.txt index 998c072..ceba98c 100644 --- a/README.txt +++ b/README.txt @@ -98,6 +98,9 @@ script added through the css and js options has stable hooks to work with. * Relative ages are time elements with an age-* class and the timestamp in data-ut, while a date shown in full is a plain time element. Line numbers are anchors named n followed by the line, while enable-tree-linenumbers is on. + A character in a file that a browser would start a new line at, though git + does not, such as a carriage return with no line feed after it, is shown as + an escape sequence in span.escape. * Colours, fonts and metrics are custom properties on div#cgit, so a theme can redefine those alone. Every rule in cgit.css starts with div#cgit, apart from the background and margins it sets on html.cgit-standalone, the class of the -- cgit 2.9.1