diff --git a/client/homebrew/brewRenderer/brewRenderer.jsx b/client/homebrew/brewRenderer/brewRenderer.jsx index 8f0f2f2ff..10d94c5ac 100644 --- a/client/homebrew/brewRenderer/brewRenderer.jsx +++ b/client/homebrew/brewRenderer/brewRenderer.jsx @@ -39,7 +39,7 @@ const BrewPage = (props)=>{ ...props }; const pageRef = useRef(null); - const cleanText = safeHTML(props.contents); + const cleanText = safeHTML(`${props.contents}\n
\n`); useEffect(()=>{ if(!pageRef.current) return; diff --git a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.less b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.less index 6180decc6..9e5a4a73b 100644 --- a/client/homebrew/brewRenderer/notificationPopup/notificationPopup.less +++ b/client/homebrew/brewRenderer/notificationPopup/notificationPopup.less @@ -85,4 +85,9 @@ display : inline-block; width : 100%; } + .blank { + height : 1em; + margin-top: 0; + & + * { margin-top: 0; } + } } \ No newline at end of file diff --git a/client/homebrew/pages/basePages/uiPage/uiPage.less b/client/homebrew/pages/basePages/uiPage/uiPage.less index 49cb8311d..e1013fa81 100644 --- a/client/homebrew/pages/basePages/uiPage/uiPage.less +++ b/client/homebrew/pages/basePages/uiPage/uiPage.less @@ -59,6 +59,13 @@ padding-left : 1.25em; list-style : square; } + .blank { + height: 1em; + margin-top: 0; + & + * { + margin-top: 0; + } + } } } } \ No newline at end of file diff --git a/shared/naturalcrit/markdown.js b/shared/naturalcrit/markdown.js index bed109772..3334b026c 100644 --- a/shared/naturalcrit/markdown.js +++ b/shared/naturalcrit/markdown.js @@ -391,7 +391,7 @@ const forcedParagraphBreaks = { } }, renderer(token) { - return `Term 1
\nTerm 1
\n\n`); }); test('Multiline Definition List must have at least one non-newline character after ::', function() { const source = 'Term 1\n::\nDefinition 1\n\n'; const rendered = Markdown.render(source).trim(); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`Term 1
\nDefinition 1
`); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`Term 1
\n\n\nDefinition 1
`); }); }); diff --git a/tests/markdown/hard-breaks.test.js b/tests/markdown/hard-breaks.test.js index fe646eac9..63bfaef9c 100644 --- a/tests/markdown/hard-breaks.test.js +++ b/tests/markdown/hard-breaks.test.js @@ -1,4 +1,4 @@ -/* eslint-disable max-lines */ + import Markdown from 'naturalcrit/markdown.js'; @@ -6,37 +6,37 @@ describe('Hard Breaks', ()=>{ test('Single Break', function() { const source = ':\n\n'; const rendered = Markdown.render(source).trim(); - expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`Line 1
\nLine 2
`); + expect(rendered, `Input:\n${source}`, { showPrefix: false }).toBe(`Line 1
\n\n\nLine 2
`); }); test('Ignored inside a code block', function() { diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 00804c19c..1a751b18d 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -689,6 +689,7 @@ background-repeat : no-repeat; background-size : contain; } + .blank { height: 1.4em; } h1 { margin-bottom : 0.3cm; font-family : 'NodestoCapsCondensed'; diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index 1a22db6a7..e107c76b8 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -437,6 +437,13 @@ body { counter-reset : page-numbers 0; } margin-bottom : 1em; & + * { margin-top : 0; } } + .blank { + height: 1em; + margin-top: 0; + & + * { + margin-top: 0; + } + } } //*****************************