-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Giving a header an ID #306
Comments
@IngwiePhoenix This is a feature from Markdown Extra which Parsedown Extra supports. |
Is it the same API? Or do I need to change anything in my code to use Parsedown Extra? On Do. Apr. 02 2015 18:22:31 Haralan Dobrev wrote:
|
@IngwiePhoenix It's the same. It's just a simple extension of the Parsedown class. You just need to include the |
Awesome. I just changed to ParsedownExtra on my project and its awesome. :) Thanks! On Do. Apr. 02 2015 18:37:13 Haralan Dobrev wrote:
|
Closing since the extension fills this role |
Is it possible to add ids automagically with ParsedownExtra? |
@sbrl What would the automagically-added ID look like? Consider this heading: # I'm not (exactly) sure how to create/build my own ID Yeah, it could manipulate the string into some sort of slug, but how could ParsedownExtra know what kind of 'slug' you want, or how long the text of the ID should be? For example, maybe you want it to output: <h1 id="im-not-exactly-sure-how-to-create-build-my-own-id">I'm not (exactly) sure how to create/build my own ID</h1> OK. Then again, maybe someone would prefer underscores: <h1 id="im_not_exactly_sure_how_to_create_build_my_own_id">I'm not (exactly) sure how to create/build my own ID</h1> Surely, for long text, everyone would like short IDs, maybe something like: <h1 id="create-build-own-id">I'm not (exactly) sure how to create/build my own ID</h1> That's why this belongs to userland. Either create an extension that 'slugifies' the text as you need it, or just use ParsedownExtra as intended: # I'm not (exactly) sure how to create/build my own ID {#custom-id} |
Hey.
Will Parsedown ever support
or similar?
Kind regards, Ingwie.
The text was updated successfully, but these errors were encountered: