diff --git a/lib/filter.js b/lib/filter.js index 5e6905c..dfc1b17 100644 --- a/lib/filter.js +++ b/lib/filter.js @@ -26,7 +26,9 @@ exports.heading = function (data) { var title = $title.text(); var id = toc.slugify(title, options); // $title.attr('id', id); - $title.children('a').remove(); + if (options.anchor) { + $title.children('a').remove(); + } $title.html( '' + $title.html() + '' ); $title.removeAttr('id');