Skip to content

Commit

Permalink
Fix for underscore in functions (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariana-Hlavaty-i2 committed Jul 31, 2023
1 parent 12c3792 commit 504cac5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions shdoc
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ function render_toc_link(text) {
# @see https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/toc_filter.rb#L44-L45
url = tolower(url)
gsub(/[^[:alnum:] _-]/, "", url)
gsub(/_/, "", url)
gsub(/ /, "-", url)
}

Expand Down
2 changes: 1 addition & 1 deletion tests/testcases/table-of-contents.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tests:put expected <<EOF
## Index
* [some:first:func](#somefirstfunc)
* [some_other_func](#some_other_func)
* [some_other_func](#someotherfunc)
### some:first:func
Expand Down

0 comments on commit 504cac5

Please sign in to comment.