This commit is contained in:
fisker Cheung committed 2022-06-06 22:04:49 +08:00
1 parent c22ea97e00
commit d4dfac4bcf
1 file changed
+4
+4
View File
@@ -57,7 +57,11 @@ function callPluginParseFunction(originalText, opts) {
const parsers = getParsers(opts);
// Create a new object {parserName: parseFn}. Uses defineProperty() to only call
// the parsers getters when actually calling the parser `parse` function.
const parsersForCustomParserApi = Object.defineProperties(
{},
Object.fromEntries(
Object.keys(parsers).map((parserName) => [
parserName,
{
enumerable: true,