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 option to disable generating ids #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fchasen
Copy link

@fchasen fchasen commented Jul 9, 2015

Added an autoIds option in Renderer. Defaults to true.

Setting it to false in the Renderer or kramed.defaults will disable creating ids.

kramed.setOptions({
    autoIds: false,
    renderer: false // must be recreated by Parser to get options
});

Also adjusts the regex to require a space between content and the id declaration per
http://kramdown.gettalong.org/syntax.html#specifying-a-header-id

That space will be removed in the output:
# Header {#myid} -> <h1 id="myid">Header</h1>

Includes a few changes to pass renderer options to Parser and merge them in Renderer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant