Comments (3)
Proposed behavior:
whitespace-mode: any
The template author does not care, this is for backward compatibility with the
existing somewhat arbitrary behavior. The existing tests may be relaxed to do
ignore_whitespace=True
whitespace-mode: strip
remove whitespace around *directives* (for network efficiency, yes it matters)
whitespace-mode: preserve
Do *exactly* what the template says. (The current behavior is *almost exactly*)
whitespace-mode: smart-indent
Well indented templates should produce well-indented outputs. Useful for
generating both HTML/XML and source code.
Original comment by [email protected]
on 10 Apr 2009 at 12:32
from json-template.
The "smart indent" style was done for the Python version. I have written some
notes
on the Reference wiki page that makes it clear that it's optional.
For the JavaScript version, I want to keep the code size small, and this
"smartness"
does add a bit of code size. So we could leave it, or find a more compact way
to
implement it -- maybe with a tokenizing regex that does something like (block
directive)|(substitution) to distinguish the 2 cases.
Original comment by [email protected]
on 17 Apr 2009 at 6:32
from json-template.
Original comment by [email protected]
on 17 Apr 2009 at 3:54
- Changed state: Started
from json-template.
Related Issues (20)
- Unbalanced section push and pop in the Java implementation HOT 3
- Add a LISP-style "let" statement
- A predicate containing the text 'or' results in a template parsing error
- typo in UrlParamsJsonTemplateFormatter HOT 2
- Error in JsonTemplateModule::FromFile() HOT 1
- Iteration over dictionary - Patch for /python/jsontemplate/_jsontemplate.py HOT 1
- Iteration over dictionary - Patch for /python/jsontemplate/_jsontemplate.py HOT 1
- cannot pip install json-template
- Javascript within JSON templates HOT 1
- <img> src being ignored. HOT 1
- Possibly a typo introduced by revision cc10d7e78b94 HOT 1
- HTML formatter doesn't work for numeric values HOT 2
- expand sometime return blank HOT 1
- Patch for /jesyll-doc/__config.json
- token_re_cache in javascript implementation doesn't do anything? HOT 2
- Setup.py dependency chaining broken; fix enclosed HOT 1
- Python 3 diff HOT 1
- json data formte with metdata of object HOT 1
- Iteration over dictionary (patch) HOT 2
- saite de filmes
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 json-template.