Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sholderbach committed Dec 22, 2024
1 parent e3b3496 commit 04155cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions make_release/release-note/notes.nu
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export def write-toc [file: path] {
get line | split chars | take while { $in == '#' } | length
}
| insert nocomment {
# We assume that comments only have one `#`
if ($in.level != 1) {
return true
}
Expand All @@ -83,6 +84,8 @@ export def write-toc [file: path] {
if ($known_h1s | any {|| $line =~ $in}) {
return true
}

# We don't know so let's ask
let user = ([Ignore Accept] |
input list $"Is this a code comment or a markdown h1 heading:(char nl)(ansi blue)($line)(ansi reset)(char nl)Choose if we include it in the TOC!")
match $user {
Expand Down

0 comments on commit 04155cb

Please sign in to comment.