Comments (4)
I agree that precise control over rendering would be a general improvement and position Mustache more firmly as a general purpose templating solution rather than an HTML orientated one.
{{{ ... }}}
is offered as a solution for preventing escaping. However, in a non HTML scenario the use of the {{{ ... }}}
becomes mandatory. For example: A safely templated AppleScript dictionary (aka record in AS) assignment requires:
-- compute myResult
set myResult to { {{{ task-input-variables }}} }
Another issue is that when rendering non HTML content (say AppleScript) a failure to utilise {{{...}}}
religiously can result in the somewhat distracting and syntax breaking appearance of one language characteristic (HTML) in the midst of another (AppleScript).
The CONTENT_TYPE proposal seems well positioned. The pragma paradigm is backwards compatible and extensible. The suggested default behaviour seems sensible.
from spec.
For the record, GRMustache 6.2 has shipped with support for text templates (documentation).
from spec.
+1
from spec.
+1
from spec.
Related Issues (20)
- Newline disappears after # tags, tab dissappears before # tags HOT 2
- Possible Improvement to Comments #8 HOT 1
- Could this repository be maintained again? HOT 17
- Variable test in sections.yml doesn't conform to internal whitespace expectations HOT 7
- incorrect json test data
- Why "Lambdas used for inverted sections should be considered truthy"? HOT 12
- Proposal on how to specify indentation of blocks HOT 3
- how to format date in mustache syntax with json template? HOT 4
- Specification is ambiguous on dotted name context handling HOT 3
- Idea: power lambdas HOT 80
- Comments: Behavior on variable name collision HOT 1
- {{#item.0}} checks and context HOT 7
- [inheritance.yml] Override parent with newline spec. Are block tags standalone? HOT 10
- Are Lambda sections standalone? HOT 2
- Please close/delete the issues
- Proposal: Trim whitespace/newlines to get improved readability? HOT 5
- How should empty tags be treated? HOT 2
- Provide clearer documentation as to the logic-less advantage of Dynamic Names? HOT 4
- The specification does not specify how to handle tags with periods in them HOT 5
- HelperIn this way, the test seems like you are purely testing for the absence of functionality. I think it is more motivating if you contrast it with the desired behavior: HOT 1
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 spec.