Avoid export default
This commit is contained in:
parent
1c60a49c96
commit
28bfb45426
18 changed files with 26 additions and 28 deletions
|
|
@ -1,19 +1,19 @@
|
|||
import parser from './parser';
|
||||
import { mfmLanguage } from './parser';
|
||||
import { MfmForest } from './types';
|
||||
import { normalize } from './normalize';
|
||||
|
||||
export default (source: string): MfmForest => {
|
||||
export function parse(source: string): MfmForest {
|
||||
if (source == null || source == '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return normalize(parser.root.tryParse(source));
|
||||
};
|
||||
return normalize(mfmLanguage.root.tryParse(source));
|
||||
}
|
||||
|
||||
export function parsePlain(source: string): MfmForest {
|
||||
if (source == null || source == '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return normalize(parser.plain.tryParse(source));
|
||||
return normalize(mfmLanguage.plain.tryParse(source));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue