From 7e0a8e4c44dad0d60f8622b1db018e883dc9a28e Mon Sep 17 00:00:00 2001 From: Birzhan Utegenov Date: Fri, 1 May 2020 23:03:55 +0700 Subject: [PATCH] Add the possibility of replacing generateCode function (#3230) --- packages/pug/lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/pug/lib/index.js b/packages/pug/lib/index.js index e76487d2c..2d9b16c9c 100644 --- a/packages/pug/lib/index.js +++ b/packages/pug/lib/index.js @@ -172,7 +172,7 @@ function compileBody(str, options){ // Compile ast = applyPlugins(ast, options, plugins, 'preCodeGen'); - var js = generateCode(ast, { + var js = (findReplacementFunc(plugins, 'generateCode') || generateCode)(ast, { pretty: options.pretty, compileDebug: options.compileDebug, doctype: options.doctype,