Skip to content

add quotation mark " to skipped TOC characters #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Knit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ private fun requireSingleLine(directive: Directive) {
require(directive.singleLine) { "${directive.name} directive must end on the same line with '$DIRECTIVE_END'" }
}

private const val skippedTocSymbols = "\\,`*{}[]()/#+.!:"
private const val skippedTocSymbols = "\\,`*{}[]()/#+.!:\""

fun makeSectionRef(name: String): String = name
.replace(' ', '-')
Expand Down
2 changes: 1 addition & 1 deletion testdata/example-toc.in.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ this is the body

##### Extreme h5

## Note: +some chars are {dropped} from the *link!
## Note: +some chars are {dropped} "from" the *link!

### See [`skippedTocSymbols`] in \src/ code(,) for a #full list.
2 changes: 1 addition & 1 deletion testdata/example-toc.out.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* [Final](#final)
* [This is h4](#this-is-h4)
* [Extreme h5](#extreme-h5)
* [Note: +some chars are {dropped} from the *link!](#note-some-chars-are-dropped-from-the-link)
* [Note: +some chars are {dropped} "from" the *link!](#note-some-chars-are-dropped-from-the-link)
* [See [`skippedTocSymbols`] in \src/ code(,) for a #full list.](#see-skippedtocsymbols-in-src-code-for-a-full-list)

<!--- END -->
Expand Down