Files
dougal-software/lib/www/server/lib/utils/markdown.js
D. Berge 313e9687bd Bring all the lib/utils from the frontend to the backend.
The idea being that eventually we will symlink the lib/utils
directory so that the same routines are available on both the
frontend and the backend.
2024-05-01 10:40:04 +02:00

12 lines
228 B
JavaScript

const { marked, parseInline } = require('marked');
function markdown (str) {
return marked(String(str));
}
function markdownInline (str) {
return parseInline(String(str));
}
module.exports = { markdown, markdownInline };