Skip to content

Commit

Permalink
Add the possibility of replacing generateCode function (#3230)
Browse files Browse the repository at this point in the history
  • Loading branch information
qvenge committed May 1, 2020
1 parent 3920013 commit 7e0a8e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pug/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7e0a8e4

Please sign in to comment.