0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 10:22:38 +00:00
This commit is contained in:
Víctor Losada Hernández
2025-05-20 11:39:16 +02:00
parent c51e8fd9d1
commit 790bb5d1b7

View File

@@ -154,7 +154,6 @@ const api = {
next(); next();
}; };
}, },
getCSS : async (req, res)=>{ getCSS : async (req, res)=>{
const { brew } = req; const { brew } = req;
if(!brew) return res.status(404).send(''); if(!brew) return res.status(404).send('');
@@ -167,7 +166,6 @@ const api = {
}); });
return res.status(200).send(brew.style); return res.status(200).send(brew.style);
}, },
mergeBrewText : (brew)=>{ mergeBrewText : (brew)=>{
let text = brew.text; let text = brew.text;
if(brew.style !== undefined) { if(brew.style !== undefined) {
@@ -185,7 +183,6 @@ const api = {
`${text}`; `${text}`;
return text; return text;
}, },
getGoodBrewTitle : (text)=>{ getGoodBrewTitle : (text)=>{
const tokens = Markdown.marked.lexer(text); const tokens = Markdown.marked.lexer(text);
return (tokens.find((token)=>token.type === 'heading' || token.type === 'paragraph')?.text || 'No Title') return (tokens.find((token)=>token.type === 'heading' || token.type === 'paragraph')?.text || 'No Title')