Skip to content

Add option to disable generating ids#20

Open
fchasen wants to merge 3 commits intoGitbookIO:masterfrom
fchasen:autoIds
Open

Add option to disable generating ids#20
fchasen wants to merge 3 commits intoGitbookIO:masterfrom
fchasen:autoIds

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.

1 participant