fix: move mark code to post-process-html step
This commit is contained in:
parent
b64124f0c8
commit
0cb8d723ac
|
@ -1,4 +1,5 @@
|
|||
const rehype = require('rehype');
|
||||
const {mark} = require('./translator');
|
||||
|
||||
/**
|
||||
* @dgProcessor postProcessHtml
|
||||
|
@ -35,7 +36,7 @@ module.exports = function postProcessHtml(log, createDocMessage) {
|
|||
.forEach(doc => {
|
||||
try {
|
||||
vFile = engine.processSync(doc.renderedContent);
|
||||
doc.renderedContent = vFile.contents;
|
||||
doc.renderedContent = mark(vFile.contents);
|
||||
vFile.messages.forEach(m => {
|
||||
log.warn(createDocMessage(m.message, doc));
|
||||
});
|
||||
|
|
|
@ -3,8 +3,6 @@ const html = require('remark-html');
|
|||
const code = require('./handlers/code');
|
||||
const mapHeadings = require('./plugins/mapHeadings');
|
||||
|
||||
const {mark} = require('./translator');
|
||||
|
||||
/**
|
||||
* @dgService renderMarkdown
|
||||
* @description
|
||||
|
@ -26,7 +24,7 @@ module.exports = function renderMarkdown() {
|
|||
.use(mapHeadings(headingMap))
|
||||
.use(html, { handlers: { code } });
|
||||
|
||||
return mark(renderer.processSync(content).toString());
|
||||
return renderer.processSync(content).toString();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue