mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-09 13:42:38 +00:00
Lint fixes.
This commit is contained in:
@@ -135,7 +135,7 @@ const NewPage = createClass({
|
|||||||
});
|
});
|
||||||
|
|
||||||
console.log('saving new brew');
|
console.log('saving new brew');
|
||||||
|
|
||||||
if(this.state.saveGoogle) {
|
if(this.state.saveGoogle) {
|
||||||
const res = await request
|
const res = await request
|
||||||
.post('/api/newGoogle/')
|
.post('/api/newGoogle/')
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ const newBrew = (req, res)=>{
|
|||||||
// Split out CSS to Style if CSS codefence exists
|
// Split out CSS to Style if CSS codefence exists
|
||||||
if(brew.text.startsWith('```css') && brew.text.indexOf('```\n\n') > 0) {
|
if(brew.text.startsWith('```css') && brew.text.indexOf('```\n\n') > 0) {
|
||||||
const index = brew.text.indexOf('```\n\n');
|
const index = brew.text.indexOf('```\n\n');
|
||||||
brew.style = `${brew.style ? brew.style + '\n' : ''}${brew.text.slice(7, index - 1)}`;
|
brew.style = `${brew.style ? `${brew.style}\n` : ''}${brew.text.slice(7, index - 1)}`;
|
||||||
brew.text = brew.text.slice(index + 5);
|
brew.text = brew.text.slice(index + 5);
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!brew.title) {
|
if(!brew.title) {
|
||||||
brew.title = getGoodBrewTitle(brew.text);
|
brew.title = getGoodBrewTitle(brew.text);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user