Add MD link option and GH link option (closes #30 and #8) #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added option for Markdown link format
[Header](#header)
in Obsidian format or Github format.For Markdown section links Obsidian URL Encodes the section text to determine the proper link text.
Implementation:
https://github.com/4very/obsidian-plugin-toc/blob/6d518849ba223aea1d09f8fa93bfa241153543eb/src/create-toc.ts#L87-L88
But section links in Github is a massive headache, luckily other people have already solved this problem in
anchor-markdown-header
. If you want to see how bad of a problem this is look at, thlorenz/anchor-markdown-header#36.Implementation:
https://github.com/4very/obsidian-plugin-toc/blob/6d518849ba223aea1d09f8fa93bfa241153543eb/src/create-toc.ts#L85-L86
Currently
anchor-markdown-header
has no Typescript support, so commit 4very@db257e0 is temporary until thlorenz/anchor-markdown-header#50 gets merged.Thank you and let me know if you need any more information. ❤️
Closes #30 and #8