Marked: FR: Option to disable images

Created on 14 Feb 2016  路  5Comments  路  Source: markedjs/marked

title.

I want to disable parsing images

![enter image description here](... "enter image title here")

should not be parsed

NFS - new feature (spec related) images

Most helpful comment

I don't believe we need a new feature for this since it can be disabled as discussed in #420 and #1302

const marked = require('marked');
const renderer = new marked.Renderer();

renderer.image = function (text) {
  return text;
};

var html = marked(markdownString, { renderer: renderer });

All 5 comments

See #420

Any updates on how can we disable parsing images?

No commits were made since my last comment. That method I linked is still the easiest one to achieve what you need.

989

I don't believe we need a new feature for this since it can be disabled as discussed in #420 and #1302

const marked = require('marked');
const renderer = new marked.Renderer();

renderer.image = function (text) {
  return text;
};

var html = marked(markdownString, { renderer: renderer });
Was this page helpful?
0 / 5 - 0 ratings

Related issues

elennaro picture elennaro  路  4Comments

priyesh-diukar picture priyesh-diukar  路  3Comments

cusalvi picture cusalvi  路  3Comments

bennycode picture bennycode  路  4Comments

chunhei2008 picture chunhei2008  路  3Comments