rmWhitespace option is ignored in preprocessed include
See original GitHub issueThe rmWhitespace
basically do his work in the compile
method.
https://github.com/mde/ejs/blob/master/lib/ejs.js#L436-L441
However, preprocess include call generateSource
directly without touch the compile
method.
https://github.com/mde/ejs/blob/master/lib/ejs.js#L198-L199
Result in rmWhitespace
completely ignored in sub templetes
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
rmWhitespace option not getting passed to ejs with express ...
I tried setting the rmWhitespace option: app.set('view engine', 'ejs'); ... rmWhitespace = true; My generated html file does not have whit.
Read more >Compiler/MSP432P401R: Ram function in MSP432 ... - TI E2E
Advanced Options offers Command File Preprocessing, but then that only offers defining preprocessor macros. There are other options: Runtime ...
Read more >node.js - Express js set view template options
Without this fix in place, rmWhitespace was not recognized as an "option", and therefore wasn't yanked out of data and into opts by...
Read more >Upgrading EJS from 1.0.0 to 2.x - Antoine Bolvy
If you, for example, wrap this logic with your own that adds the options parameter, EJS will ignore express' options. Bad code: function ......
Read more >Source: lib/ejs.js - JSDoc
Useful for template preprocessing or restricting access; * to a certain part ... If you would like to include options but not data,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mmis1000 Since you have identified the problem, would you care to put together a PR that fixes this?
Fixed in 6b17878.