Open anlexN opened 6 years ago
@Tiliavir , just options.self = true, how to use. no other problem. can you showcase this? pug document don't details about it!
This is pug-lint not pugjs - I can't find a single reference for "self" in the pug-lint repository. Where did you find that option? What did you expect it to do?
@Tiliavir
As I said: this issue was created in the wrong repository and should be closed! This is where it should have been created: https://github.com/pugjs/pug
And the documentation is quite clear, no? Set self to true, and variables in the scope are not accessible directly, but as a member of the "self" variable ...
E.g. refering to those "locals" mentioned below your screenshot - a sample could look like this:
options.self = true;
var fn = pug.compileClient('string of pug', options);
var locals = { foo: 1, bar: 2};
var html = fn(locals);
If set to self is set to true, you cant use foo
or barby their name directly but using
self.fooand
self.bar`...
Any details? How to reproduce your issue? How is this related to pug-lint?