Skip to content

Commit

Permalink
chore(build): measure of evanw/esbuild#2706
Browse files Browse the repository at this point in the history
  • Loading branch information
SettingDust committed Dec 1, 2022
1 parent de14110 commit 6f80452
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { nodeExternalsPlugin } from 'esbuild-node-externals';
target: 'es2017',
logLevel: 'info',
color: true,
minify: true,
minifySyntax: true,
sourcemap: true,
legalComments: 'external'
}
Expand Down
9 changes: 5 additions & 4 deletions src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,11 @@ export function parseHTML(html: string, options: NodeHtmlMarkdownOptions): Eleme
el = tryParseWithNativeDom(html);
}
catch (e) {
if (__IS_BROWSER__) throw e;
nodeHtmlParse = getNodeHtmlParser();
if (nodeHtmlParse) console.warn('Native DOM parser encountered an error during parse', e);
else throw e;
if (!__IS_BROWSER__) {
nodeHtmlParse = getNodeHtmlParser();
if (nodeHtmlParse) console.warn('Native DOM parser encountered an error during parse', e);
else throw e;
} else throw e;
}
} else nodeHtmlParse = getNodeHtmlParser();

Expand Down

0 comments on commit 6f80452

Please sign in to comment.