Skip to content

Commit

Permalink
remove heading ids, since this is so weird shit
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjobeki committed Jan 3, 2024
1 parent 1b4f459 commit 3355136
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
11 changes: 1 addition & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,7 @@ fn handle_heading(line: &str, levels: usize) -> String {
_ => "#".repeat(hashes.len() + levels),
};

// TODO: More "correct" format would be
// let title = format!("lib.{}.{}", self.category, self.name);
// let ident = format!(
// "lib.{}.{}",
// self.category,
// self.name.replace('\'', "-prime")
// );
// -> {#function-library-{ident}-{rest} }
// Since this will be totally bullshitting if we want to migrate to a different rendering
format!("{leading_trivials}{new_hashes} {rest} {{#{rest}}}")
format!("{leading_trivials}{new_hashes} {rest}")
}

/// Dumb, mutable, hacky doc comment "parser".
Expand Down
17 changes: 17 additions & 0 deletions test.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
/**
Doc Comment
indent 1
indent 2
# H1
## H2
### H3
#### H4
*/
# TODO
/**/
a = 1;
}

0 comments on commit 3355136

Please sign in to comment.