Skip to content

Commit

Permalink
Update renderer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahDragon authored Apr 4, 2017
1 parent 8a20f41 commit e9c6be0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Renderer.prototype.listitem = function(text) {

// Add id attribute to headings
Renderer.prototype.heading = function(text, level) {
var transformOption = this.options.modifyAnchors;
var transformOption = this.config.marked.modifyAnchors;
var id = anchorId(stripHTML(text), transformOption);
var headingId = this._headingId;

Expand All @@ -52,11 +52,11 @@ function anchorId(str, transformOption) {
}

// Support AutoLink option
if (!this.options.autolink) {
if (!this.config.marked.autolink) {
Renderer.prototype.link = function(href, title, text) {
var prot;

if (this.options.sanitize) {
if (this.config.marked.sanitize) {
try {
prot = decodeURIComponent(unescape(href))
.replace(/[^\w:]/g, '')
Expand Down

0 comments on commit e9c6be0

Please sign in to comment.