Skip to content
This repository was archived by the owner on Feb 16, 2025. It is now read-only.

Commit 68e1d60

Browse files
committed
modify formatting of table of contents
Signed-off-by: Ryan Brue <[email protected]>
1 parent bb64330 commit 68e1d60

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ authors = ["Ryan Brue <[email protected]>"]
44
repository = "https://github.com/ryanabx/simple-ssg"
55
license = "MIT"
66
readme = "README.md"
7-
version = "3.0.1"
7+
version = "3.0.2"
88
edition = "2021"
99
description = "Plain and simple static site generator for Djot and Markdown light markup languages"
1010

src/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ fn generate_table_of_contents(
343343
prev_depth = *depth;
344344
if *depth > 0 {
345345
table_of_contents_html.push_str(&format!(
346-
"<li>{}</li><ul>",
346+
"<li><b><u>{}:</u></b></li><ul>",
347347
&relative_path.to_string_lossy(),
348348
));
349349
}
@@ -361,7 +361,7 @@ fn generate_table_of_contents(
361361
prev_depth = *depth;
362362
if relative_path == my_result {
363363
table_of_contents_html
364-
.push_str(&format!("<li>{}</li>", &relative_path.to_string_lossy()))
364+
.push_str(&format!("<li><b>{}</b></li>", &relative_path.to_string_lossy()))
365365
} else {
366366
table_of_contents_html.push_str(&format!(
367367
"<li><a href=\"{}{}{}\">{}</a></li>",
@@ -370,7 +370,7 @@ fn generate_table_of_contents(
370370
} else {
371371
"".to_string()
372372
},
373-
&web_prefix.unwrap_or("./"),
373+
&web_prefix.unwrap_or(""), // "./" if "" doesn't work
374374
&relative_path.to_string_lossy(),
375375
&relative_path.to_string_lossy()
376376
))

0 commit comments

Comments
 (0)