0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-12 15:22:45 +00:00

Relocate from 5ePHB to Blank theme

This commit is contained in:
G.Ambatte
2023-06-15 13:42:10 +12:00
parent ade61971d0
commit e06f5e17d9
3 changed files with 46 additions and 51 deletions

View File

@@ -1,19 +0,0 @@
module.exports = {
createFooterFunc : function(headerSize=1){
return (props)=>{
const cursorPos = props.cursorPos;
let header='';
while (header.length < headerSize) {
header = header.concat('#');
}
header = header.concat(' ');
const textArray = props.brew.text.split('\n').slice(0, cursorPos.line).reverse();
const textArrayFilter = textArray.filter((line)=>{ return line.slice(0, header.length) == header; });
const text = textArrayFilter[0]?.slice(header.length).trim() || 'PART 1 | SECTION NAME';
return `\n{{footnote ${text}}}\n`;
};
}
};