Glitch theme

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
2022-05-02 14:29:27 +01:00
parent f99cd77e20
commit 186bdde093
16 changed files with 436 additions and 406 deletions

6
app.js
View File

@@ -55,6 +55,12 @@ app.get("/healthz", function(req, res) {
var md = markdown({html: true});
md.parser.use(emoji);
const proxy = (tokens, idx, options, env, self) => self.renderToken(tokens, idx, options);
const defaultTableOpenRenderer = md.parser.renderer.rules.table_open || proxy;
md.parser.renderer.rules.table_open = function(tokens, idx, options, env, self) {
tokens[idx].attrJoin("role", "grid");
return defaultTableOpenRenderer(tokens, idx, options, env, self)
};
Handlebars.registerHelper('markdown', function(text) {
if(!text) return;