mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-27 16:03:07 +00:00
change legacy snippets to use named exports and move from dedent-tabs to dedent
This commit is contained in:
@@ -47,7 +47,8 @@ const getTOC = (pages)=>{
|
||||
return res;
|
||||
};
|
||||
|
||||
export default function(props){
|
||||
function tableOfContentsGen(props){
|
||||
|
||||
const pages = props.brew.text.split('\\page');
|
||||
const TOC = getTOC(pages);
|
||||
const markdown = _.reduce(TOC, (r, g1, idx1)=>{
|
||||
@@ -69,4 +70,6 @@ export default function(props){
|
||||
##### Table Of Contents
|
||||
${markdown}
|
||||
</div>\n`;
|
||||
};
|
||||
}
|
||||
|
||||
export default tableOfContentsGen;
|
||||
Reference in New Issue
Block a user