mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-31 13:02:38 +00:00
Removed CSS splitting from homebrew.api.js and back to newPage.jsx.
This commit is contained in:
@@ -31,13 +31,6 @@ const newBrew = (req, res)=>{
|
||||
|
||||
const brew = req.body;
|
||||
|
||||
// Split out CSS to Style if CSS codefence exists
|
||||
if(brew.text.startsWith('```css') && brew.text.indexOf('```\n\n') > 0) {
|
||||
const index = brew.text.indexOf('```\n\n');
|
||||
brew.style = `${brew.style ? `${brew.style}\n` : ''}${brew.text.slice(7, index - 1)}`;
|
||||
brew.text = brew.text.slice(index + 5);
|
||||
};
|
||||
|
||||
if(!brew.title) {
|
||||
brew.title = getGoodBrewTitle(brew.text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user