Skip to content
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

Add MD link option and GH link option (closes #30 and #8) #33

Merged
merged 3 commits into from
May 11, 2023

Conversation

4very
Copy link
Contributor

@4very 4very commented Mar 22, 2023

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

@hipstersmoothie hipstersmoothie added the minor Increment the minor version when merged label May 11, 2023
@hipstersmoothie hipstersmoothie merged commit 2e183cd into hipstersmoothie:main May 11, 2023
@github-actions
Copy link

🚀 PR was released in 0.2.0 🚀

@github-actions github-actions bot added the released This issue/pull request has been released. label May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Increment the minor version when merged released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Respect "Use [[Wikilinks]]" Setting
2 participants