Merge plainParser into mfm

This commit is contained in:
Aya Morisawa
2019-01-30 15:12:48 +09:00
parent ca26edbfce
commit 98795aad9a
3 changed files with 39 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
import parser, { plainParser } from './parser';
import parser from './parser';
import { MfmForest } from './types';
import { normalize } from './normalize';
@@ -7,6 +7,6 @@ export default (source: string, plainText = false): MfmForest => {
return null;
}
const raw = plainText ? plainParser.root.tryParse(source) : parser.root.tryParse(source) as MfmForest;
const raw = plainText ? parser.plain.tryParse(source) : parser.root.tryParse(source) as MfmForest;
return normalize(raw);
};