Browse Source

Up

custom-code-parser
Artur Arseniev 4 months ago
parent
commit
c8c0eb2cdc
  1. 4
      packages/core/src/parser/index.ts

4
packages/core/src/parser/index.ts

@ -46,9 +46,9 @@ export default class ParserModule extends Module<ParserConfig & { name?: string
const { config } = this; const { config } = this;
this.parserCss = ParserCss(em, config); this.parserCss = ParserCss(em, config);
this.parserHtml = ParserHtml(em, config); this.parserHtml = ParserHtml(em, config);
const initialParserCode = config.parserCode; const parserCode = config.parserCode || '';
Object.entries(config.parsersCode || {}).forEach(([id, parser]) => this.addParserCode(id, parser)); Object.entries(config.parsersCode || {}).forEach(([id, parser]) => this.addParserCode(id, parser));
initialParserCode !== undefined && (this.parserCode = initialParserCode || ''); this.parserCode = parserCode;
} }
get parserCode() { get parserCode() {

Loading…
Cancel
Save