From 4c4b66bd572ef719243afaf64b430b2449753e1d Mon Sep 17 00:00:00 2001 From: arve0 Date: Sat, 13 Aug 2016 00:20:17 +0200 Subject: [PATCH] code renderer: do not render double space before attrs renderAttrs already adds a space before attributes Before: for i in range(10): Now: for i in range(10): --- lib/renderer.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/renderer.js b/lib/renderer.js index c9077b1..79ad78a 100644 --- a/lib/renderer.js +++ b/lib/renderer.js @@ -19,20 +19,18 @@ var default_rules = {}; default_rules.code_inline = function (tokens, idx, options, env, slf) { - var token = tokens[idx], - attrs = slf.renderAttrs(token); + var token = tokens[idx]; - return '' + + return '' + escapeHtml(tokens[idx].content) + ''; }; default_rules.code_block = function (tokens, idx, options, env, slf) { - var token = tokens[idx], - attrs = slf.renderAttrs(token); + var token = tokens[idx]; - return '' + + return '' + escapeHtml(tokens[idx].content) + '\n'; };