From 76ced9ca49db0198341b69ae1e266940f049fe8e Mon Sep 17 00:00:00 2001 From: Scott Tolksdorf Date: Sun, 22 Jan 2017 13:56:57 -0500 Subject: [PATCH] Added comma parsing to the block code --- shared/homebrewery/markdown.new.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/homebrewery/markdown.new.js b/shared/homebrewery/markdown.new.js index a155e2350..a990d15a4 100644 --- a/shared/homebrewery/markdown.new.js +++ b/shared/homebrewery/markdown.new.js @@ -25,7 +25,7 @@ module.exports = { render : (rawBrewText)=>{ //Adds in the new div block syntax let count = 0; - let blockReg = /{{\w+|}}/g; + let blockReg = /{{[\w|,]+|}}/g; const renderer = new Markdown.Renderer(); renderer.paragraph = function (text) { const matches = text.match(blockReg); @@ -35,7 +35,7 @@ module.exports = { if(text) r.push(`

${text}

\n`); const block = matches[matchIndex]; if(block && _.startsWith(block, '{{')){ - r.push(`
`); + r.push(`
`); count++; } if(block == '}}' && count !== 0){