Comments (6)
It's by design by @mde. No idea though on why he changed it.
from ejs.
Yeah I'd love an explanation @mde. It's confusing if you're using multiple tempting systems server-side. Nicer to just have completely alternate syntax. At quick look I don't see a technical reason why this was removed?
from ejs.
The implementation of delimiters in the old version was one of the two non-standard features (along with filters) that I opted not to port over. There are multiple other (older) implementations of EJS which all implement delimiter customization the same way. AFAIK all the other similar templating engines (ERB, PHP, ASP et al) implement it the way we do now.
The old API for this also required a much more special-case implementation, because it wasn't simple replacement of single character across the entire range of available tags -- note that there are multiple open tags as well as closing tags. IIRC the old implementation didn't handle these. The only benefit I can think of of the old API was making EJS look like Mustache templates, which doesn't seem like a huge practical value given the amount of work that would be required to port and maintain the feature.
Hope that answers your question.
from ejs.
For the case where you're using multiple templating engines, I consider it pretty important. I don't want an EJS template to appear, at first glance, to look anything like another template that we're using, and the ability to do this is why EJS ended up in our code base in the first place. As EJS is going to be server side and it's likely you're using something else client side (Mustache, Underscore, etc) that also might be periodically called on server-side, I think it should have remained as a feature as it had always been in the library.
That said I understand this is a specialized use case. It sounds like you don't want to entertain adding this back, which is disappointing.
from ejs.
Sorry for the inconvenience here. I understand why you might want it, but it would add a significant amount of complexity for a very minor use-case. As far as it "always being in the library," The v1 of the NPM lib for EJS is only one of at least four implementations of EJS that I know of going back to the early 2000s, and none of them ever had anything like this AFAIK. The v1 code also had a non-standard "filters" feature that didn't make the cut. One of my goals with EJS was to bring it more in line with all the other implementations (and other similar templating languages like ERB, PHP, et al), and remove non-standard features, and unfortunately this is one of the casualties. I'm going to go ahead and close this issue.
from ejs.
If you want to create asp pages within a yeoman generator this would be very helpfull too. Currently I have to pass two variables aspOpen
and aspClose
and echo them out <%= aspOpen %>do something<%= aspClose %>
- not soooo nice.
from ejs.
Related Issues (20)
- Functions do not return embedded HTML HOT 2
- Add a precompile step HOT 3
- Update jake dependency to avoid [email protected] snyk vulnerability HOT 1
- Fetching Include from a database? HOT 1
- Client True includes are not getting imports recursively HOT 1
- <%-%> auto converting \n in <br> HOT 1
- I just canβt solve the problem with include, I tried different methods, different syntaxes HOT 1
- global scope of variables HOT 1
- Meterian Scan - Security Issue (concat-map version 0.0.1) HOT 4
- Cannot read properties of null if CSS is linked HOT 2
- Is there a way to use ejs on the front-end? HOT 3
- How can we automate dependencies update in project with placeholders? EJS HOT 1
- Eval issue; "data is not defined" HOT 1
- jake aborted - unable to make/build ejs HOT 2
- uglify is not recognized HOT 1
- async option is not true async 3.1.10
- Include partial inside of another partial HOT 2
- How to deply express app with ejs files on netlify.
- SECURITY.md explained HOT 1
- ejs:3.1.10 Vulnerability HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ejs.