|
|
@@ -2,7 +2,7 @@ import marked from 'marked';
|
|
|
import hljs from 'highlight.js';
|
|
|
|
|
|
import MarkdownFixer from './PreProcessor/MarkdownFixer';
|
|
|
-import Linker from './PreProcessor/Linker';
|
|
|
+import Linker from './PreProcessor/Linker';
|
|
|
import ImageExpander from './PreProcessor/ImageExpander';
|
|
|
|
|
|
import Tsv2Table from './LangProcessor/Tsv2Table';
|
|
|
@@ -17,9 +17,6 @@ export default class CrowiRenderer {
|
|
|
new ImageExpander(),
|
|
|
];
|
|
|
|
|
|
- this.postProcessors = [
|
|
|
- ];
|
|
|
-
|
|
|
this.langProcessors = {
|
|
|
'tsv2table': new Tsv2Table(),
|
|
|
'tsv2table-h': new Tsv2Table({header: true}),
|
|
|
@@ -39,16 +36,6 @@ export default class CrowiRenderer {
|
|
|
return markdown;
|
|
|
}
|
|
|
|
|
|
- postProcess(html) {
|
|
|
- for (let i = 0; i < this.postProcessors.length; i++) {
|
|
|
- if (!this.postProcessors[i].process) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- html = this.postProcessors[i].process(html);
|
|
|
- }
|
|
|
- return html;
|
|
|
- }
|
|
|
-
|
|
|
codeRenderer(code, lang, escaped) {
|
|
|
let result = '', hl;
|
|
|
|
|
|
@@ -104,7 +91,6 @@ export default class CrowiRenderer {
|
|
|
|
|
|
markdown = this.preProcess(markdown);
|
|
|
html = this.parseMarkdown(markdown);
|
|
|
- html = this.postProcess(html);
|
|
|
|
|
|
return html;
|
|
|
}
|