1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-25 06:56:40 +07:00

made plaintext posts

This commit is contained in:
Fedor Katurov 2021-05-21 10:48:44 +07:00
parent 26fea2541e
commit ba2832ca34
7 changed files with 67 additions and 30 deletions

View file

@ -31,7 +31,8 @@ export class Template<
.use(frontmatter)
.use(extract, { yaml: parse })
.use(removeFrontmatter)
.use(parser);
.use(parser)
.use(strip);
const file = toVFile.readSync(path.join(__dirname, "../../", filename));
const result = processor.processSync(file);
@ -47,7 +48,7 @@ export class Template<
* Themes the template with values
*/
public theme = (values: V) => {
return hb.compile(this.template)(values);
return hb.compile(this.template)(values).replace(/\n/g, "\n\n");
};
/**