+ `;
+ } else {
+ footerText = `${footerText}
+`;
+ }
+
+ const regexHeader = new RegExp(/([\s\S]*?)\s:::note/);
+ const header = doc.match(regexHeader)[1];
+
+ console.log('header', header);
+
+ const regexContent = new RegExp(
+ /Author: Thomas Laforge([\s\S]*?)### Submitting your work/
+ );
+ const matchContent = buffer.match(regexContent);
+
+ let content = '';
+ if (!matchContent) {
+ const regexOldContent = new RegExp(
+ /Author: Thomas Laforge([\s\S]*?)## Submitting your work/
+ );
+ content = buffer.match(regexOldContent)[1];
+ } else {
+ content = matchContent[1];
+ }
+
+ const fullDocText = `${header}
+
+:::note
+WIP
+:::
+
+