mirror of
https://github.com/wassname/talk.git
synced 2026-07-06 05:17:19 +08:00
14 lines
312 B
JavaScript
14 lines
312 B
JavaScript
const TurndownService = require('turndown');
|
|
|
|
module.exports = {
|
|
RootMutation: {
|
|
createComment: {
|
|
async pre(_, { input }, _context, _info) {
|
|
// Saving the HTML comment as Markdown
|
|
const ts = new TurndownService();
|
|
input.body = ts.turndown(input.body);
|
|
},
|
|
},
|
|
},
|
|
};
|