0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-30 08:52:38 +00:00

Prevent extra columns

This commit is contained in:
David Bolack
2025-08-30 17:37:23 -05:00
parent 7198c21229
commit 986bfdd00a

View File

@@ -40,7 +40,7 @@ const BrewPage = (props)=>{
...props ...props
}; };
const pageRef = useRef(null); const pageRef = useRef(null);
const cleanText = safeHTML(`${props.contents}\n<div class="columnSplit"></div>\n`); const cleanText = safeHTML(`${props.contents}\n`);
useEffect(()=>{ useEffect(()=>{
if(!pageRef.current) return; if(!pageRef.current) return;
@@ -207,7 +207,8 @@ const BrewRenderer = (props)=>{
} }
// DO NOT REMOVE!!! REQUIRED FOR BACKWARDS COMPATIBILITY WITH NON-UPGRADABLE VERSIONS OF CHROME. // DO NOT REMOVE!!! REQUIRED FOR BACKWARDS COMPATIBILITY WITH NON-UPGRADABLE VERSIONS OF CHROME.
pageText += `\n\n&nbsp;\n\\column\n&nbsp;`; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
pageText += pageText.indexOf(`\n\\column\n`) < 0 ? `\n\n&nbsp;\n\\column\n&nbsp;` : 0; //Artificial column break at page end to emulate column-fill:auto (until `wide` is used, when column-fill:balance will reappear)
const html = Markdown.render(pageText, index); const html = Markdown.render(pageText, index);