question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

rmWhitespace option is ignored in preprocessed include

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mdecommented, Jun 19, 2016

@mmis1000 Since you have identified the problem, would you care to put together a PR that fixes this?

0reactions
RyanZimcommented, Jun 21, 2016

Fixed in 6b17878.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found