mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Merge pull request #1032 from bobylito/master
Make the markdown parser able to generate anchors for headings
This commit is contained in:
commit
ff3760937a
@ -104,9 +104,11 @@ function getParseFunction(parserName, conf) {
|
||||
// Marked generates an "id" attribute for headers; this custom renderer suppresses it
|
||||
markedRenderer = new marked.Renderer();
|
||||
|
||||
if(!conf.idInHeadings) {
|
||||
markedRenderer.heading = function(text, level) {
|
||||
return util.format('<h%s>%s</h%s>', level, text, level);
|
||||
};
|
||||
}
|
||||
|
||||
// Allow prettyprint to work on inline code samples
|
||||
markedRenderer.code = function(code, language) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user