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 support for inline anchors in Markdown parsing #331

Merged
merged 6 commits into from
Jan 23, 2025

Conversation

Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Jan 23, 2025

Introduced a parser for inline anchors using $$$ syntax and updated related components to handle and render them as HTML anchor tags. Enhanced heading slug generation to exclude inline anchors, and added comprehensive tests to ensure correct behavior.

this is regular text and this $$$is-an-inline-anchor$$$ and this continues to be regular text

will emit:

<p>this is regular text and this <a id="is-an-inline-anchor"></a> and this continues to be regular text</p>

Since this is an inline leaf it can be nested in all markdown container constructs.

Introduced a parser for inline anchors using `$$$` syntax and updated related components to handle and render them as HTML anchor tags. Enhanced heading slug generation to exclude inline anchors, and added comprehensive tests to ensure correct behavior.
@Mpdreamz Mpdreamz requested a review from reakaleek January 23, 2025 13:50
@Mpdreamz Mpdreamz merged commit 62f580a into main Jan 23, 2025
5 checks passed
@Mpdreamz Mpdreamz deleted the feature/inline-anchors branch January 23, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants