Open fchasen opened 9 years ago
Added an autoIds option in Renderer. Defaults to true.
autoIds
Renderer
true
Setting it to false in the Renderer or kramed.defaults will disable creating ids.
false
kramed.defaults
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>
# Header {#myid}
<h1 id="myid">Header</h1>
Includes a few changes to pass renderer options to Parser and merge them in Renderer.
Parser
Added an
autoIds
option inRenderer
. Defaults totrue
.Setting it to
false
in theRenderer
orkramed.defaults
will disable creating ids.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 inRenderer
.