diff options
Diffstat (limited to 'lib/render.js')
-rw-r--r-- | lib/render.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/render.js b/lib/render.js index 95c8c50..ace346d 100644 --- a/lib/render.js +++ b/lib/render.js @@ -62,6 +62,18 @@ MdRenderer.prototype.mention = function (preceding, id) { }, id).outerHTML } +MdRenderer.prototype.code = function (code, lang, escaped) { + if (void 'TODO: check a config option') { + return marked.Renderer.prototype.code.call(this, code, lang, escaped) + } + // render as a textarea for better line wrapping in dillo + return h('textarea', { + cols: 80, + rows: u.rows(code), + innerHTML: escaped ? code : u.escapeHTML(code) + }).outerHTML +} + function lexerRenderEmoji(emoji) { var el = this.renderer.render.emoji(emoji) return el && el.outerHTML || el |