0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 21:42:45 +00:00

Renaming colors and a bunch of other things

This commit is contained in:
Scott Tolksdorf
2017-06-04 16:04:34 -04:00
parent 705adbe2c6
commit 10f9ac14c7
11 changed files with 35 additions and 31 deletions

View File

@@ -11,7 +11,10 @@ renderer.paragraph = function(text){
if(!matches) return `\n<p>${text}</p>\n`;
let matchIndex = 0;
const res = _.reduce(text.split(blockReg), (r, text) => {
console.log(text);
//if(text) r.push(text);
if(text) r.push(Markdown(text, {renderer : renderer, sanitize: true}));
const block = matches[matchIndex];
if(block && block[0] == '{'){
r.push(`\n\n<div class="block ${block.substring(2).split(',').join(' ')}">`);
@@ -30,7 +33,7 @@ renderer.image = function(href, title, text){
return `<img src="${href}" class="${text.split(',').join(' ')}"></img>`;
};
renderer.list = function(list, isOrdered, isDef){
if(isDef) return `<ul class='def'>${list}</ul>`;
if(isDef) return `<ul class='alt'>${list}</ul>`;
if(isOrdered) return `<ol>${list}</ol>`;
return `<ul>${list}</ul>`;
}