💾 Archived View for lists.flounder.online › patches › threads › 20210330220930.3273-2-johann@qwertqw… captured on 2022-07-16 at 16:24:32. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-04-28)
-=-=-=-=-=-=-
From: johann@qwertqwefsday.eu
Date: Wed, 31 Mar 2021 00:09:30 +0200
Message-Id: 20210330220930.3273-2-johann@qwertqwefsday.eu
To: <~aw/patches@lists.sr.ht>
In-Reply-To: 20210330220930.3273-1-johann@qwertqwefsday.eu
Cc: "Johann150" <johann@qwertqwefsday.eu>
--------------------------------------
I forgot to change the class style back to Spaced, which is what
was used when generating the base of the style sheets from syntect.
Also the .line CSS selector interfered with some syntect items
that were also using this class. The solution is to restrict it
to links only. This made some lines, e.g. with doc comments
display wrong by having multiple line numbers on one line.
---
src/main.rs | 2 +-
templates/static/style.css | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 18a4ec3..15c9c62 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -423,7 +423,7 @@ async fn repo_file(req: Request<()>) -> tide::Result {
let mut highlighter = ClassedHTMLGenerator::new_with_class_style(
&syntax,
&syntax_set,
- ClassStyle::SpacedPrefixed { prefix: "code" },
+ ClassStyle::Spaced,
);
LinesWithEndings::from(file_string)
.for_each(|line| highlighter.parse_html_for_line_which_includes_newline(line));
diff --git a/templates/static/style.css b/templates/static/style.css
index 0399b3c..5f2b65d 100644
--- a/templates/static/style.css
+++ b/templates/static/style.css
@@ -34,7 +34,7 @@ body {
font-size: .9rem;
}
-.line {
+a.line {
display: inline-block;
width: 4em;
margin-right: .7em;
--
2.30.1.windows.1