mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-13 15:12:43 +00:00
Added nested markdown parsering within blocks
This commit is contained in:
@@ -12,8 +12,8 @@ renderer.paragraph = function(text){
|
|||||||
const res = _.reduce(text.split(blockReg), (r, text) => {
|
const res = _.reduce(text.split(blockReg), (r, text) => {
|
||||||
if(text) r.push(Markdown(text, {renderer : renderer, sanitize: true}));
|
if(text) r.push(Markdown(text, {renderer : renderer, sanitize: true}));
|
||||||
const block = matches[matchIndex];
|
const block = matches[matchIndex];
|
||||||
if(block && _.startsWith(block, '{{')){
|
if(block && block[0] == '{'){
|
||||||
r.push(`\n\n<div class="${block.substring(2).split(',').join(' ')}">`);
|
r.push(`\n\n<div class="block ${block.substring(2).split(',').join(' ')}">`);
|
||||||
blockCount++;
|
blockCount++;
|
||||||
}
|
}
|
||||||
if(block == '}}' && blockCount !== 0){
|
if(block == '}}' && blockCount !== 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user