0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 13:42:38 +00:00

Add new line before appending style data

Add a new line between the existing style data and the appended codefenced style data.
This commit is contained in:
Sean Robertson
2021-06-21 13:00:12 +12:00
parent 69231ba57a
commit cf4bfc35ea

View File

@@ -138,7 +138,7 @@ const NewPage = createClass({
// 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.text.slice(7, index - 1)}`;
brew.style = `${brew.style}\n${brew.text.slice(7, index - 1)}`;
brew.text = brew.text.slice(index + 5);
}