diff --git a/index.tsx b/index.tsx index 736d7bc4..8bed8b11 100644 --- a/index.tsx +++ b/index.tsx @@ -54,6 +54,29 @@ export const RuleType = { unorderedList: 33, } as const +const enum Priority { + /** + * anything that must scan the tree before everything else + */ + MAX, + /** + * scans for block-level constructs + */ + HIGH, + /** + * inline w/ more priority than other inline + */ + MED, + /** + * inline elements + */ + LOW, + /** + * bare text and stuff that is considered leftovers + */ + MIN, +} + export namespace MarkdownToJSX { /** * RequireAtLeastOne<{ ... }> <- only requires at least one key @@ -1220,29 +1243,6 @@ function getTag(tag: string, overrides: MarkdownToJSX.Overrides) { : get(overrides, `${tag}.component`, tag) } -enum Priority { - /** - * anything that must scan the tree before everything else - */ - MAX, - /** - * scans for block-level constructs - */ - HIGH, - /** - * inline w/ more priority than other inline - */ - MED, - /** - * inline elements - */ - LOW, - /** - * bare text and stuff that is considered leftovers - */ - MIN, -} - export function compiler( markdown: string, options: MarkdownToJSX.Options = {} diff --git a/tsconfig.json b/tsconfig.json index c4bbb32f..92941a34 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,8 +8,8 @@ "module": "ESNext", "moduleResolution": "node", "outDir": "./dist", - "target": "ESNext", - "preserveConstEnums": true + "preserveConstEnums": true, + "target": "ESNext" }, "files": ["index.tsx"] }