Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pug.compileClient example code is wrong #40

Open
GHolk opened this issue Jul 4, 2023 · 0 comments
Open

pug.compileClient example code is wrong #40

GHolk opened this issue Jul 4, 2023 · 0 comments

Comments

@GHolk
Copy link

GHolk commented Jul 4, 2023

The example in pug.compileClient is wrong:

var pug = require('pug');

// Compile a function
var fn = pug.compileClient('string of pug', options);

// Render the function
var html = fn(locals);
// => 'function template(locals) { return "<string>of pug</string>"; }'

pug.compileClient return a string. fn is not a callable function, except we eval it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant