Skip to content

Commit

Permalink
Markdownz bugfixes
Browse files Browse the repository at this point in the history
- Fix a bug when `params.project` is undefined.
- Remove `twemoji`.
- Remove the old `Markdown` class.
  • Loading branch information
eatyourgreens committed Nov 6, 2023
1 parent 1fb7a55 commit 8f8d420
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 73 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ app.post('/html', function(req, res) {
params = req.body;
res.setHeader('Content-Type', 'text/html');
res.statusCode = 200;
html = utils.getHtml({
const project = params.project ? { slug: params.project } : undefined;
const html = utils.getHtml({
baseURI: 'https://www.zooniverse.org',
content: params.markdown,
project: {
slug: params.project
}
project,
debug: true
})
res.end('<div>' + html + '</div>');
});
Expand Down
67 changes: 0 additions & 67 deletions lib/markdown.js

This file was deleted.

1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"author": "The Zooniverse",
"license": "Apache-2.0",
"dependencies": {
"@twemoji/api": "^14.1.2",
"body-parser": "^1.20.2",
"express": "^4.18.2",
"markdownz": "^9.1.4",
Expand Down

0 comments on commit 8f8d420

Please sign in to comment.