GithubHelp home page GithubHelp logo

erazor's People

Contributors

andyli avatar astro75 avatar ciscoheat avatar fponticelli avatar waneck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

erazor's Issues

how can i change the delimiter syntax

is there any method available by which i can change the delimiter from @ to <% and %>
that is, instead of
var s = new Template("Hello, @name!").execute({name:"World"});
i may be able to process this:
var s = new Template("Hello, <%=name%>!").execute({name:"World"});

Project direction

Currently, while I like a lot and use erazor daily in my own projects, I feel that we lack a little direction or ownership about it at the moment.

Can we use this issue to discuss that? I'd like to implement some extra features, and work on a better way to deal with escaping/raw, templating in general (following how razor does it), and better support for erazor macros. If no-one oposes to that, I propose that we release our current version as erazor 1.0, and start working on erazor 2.0 with these extra features - maybe breaking backwards compatibility.

cc @fponticelli @ciscoheat @jasononeil

Add option to automatically escape content

It would be great to add a way (maybe even default it) to add a escape function (e.g. htmlEscape) for the variable output, as not adding it opens up some possible security holes.

Allow {} inside template

It is a feature request, that is to allow nested {} appear inside a template.

I'm using erazor to generate haxe source code, which as you can imagine there are lots of {} inside the template. Currently to escape it, I use @("}"), which is ugly and hard to type.

I think it is safe to accept {} inside template by counting the number of { and }, because normally they come in pair (independent of context). Only use @("}") to escape single { or } is better, since it is rarer.

erazor macros and haxe 2.10RC compile errors

i'm getting an error using erazor macros...

"/erazor/macro/Build.hx:281: lines 281-398 : Some constructors are not matched : EMacro"
"\erazor\src/erazor/macro/Template.hx:8: characters 2-11 : Build failure"
"src/server/Index.hx:20: characters 15-32 : src.server.view.IndexView has no field execute"

comments

there is no way to comment stuff in templates..
//@popopo or is still parsed as a possible block !.

perhaps at least :

 @ignore (){  
<img src="path/@popop" />
}
<img src="path/@pipip" />

..

TestSimpleMacro and TestMacro tests fail

Running tests on PHP target causes exceptions:
erazor.TestSimpleMacro test_Block_with_enum_match: ERROR E call_user_func_array() expects parameter 1 to be a valid callback, no array or string given (errno: 2) in /home/dev/workspace-haxe/erazor/bin/TestAll/lib/erazor/macro/Template.class.php at line #5 (...)

It seems dynamic function 'escape' in erazor.macro.Template is never initialized.

Am I the only one seeing these issues (there're more failed tests on other targets)?

haxe Statics don't work

Hi guys ! i recently noticed that haxe Statics like Math or Std doesnt work (at least for macros).
i ran the test to verify and it doesnt pass !!
(..) /test/erazor/TestMacro.hx:123: character 10 : { x : Float } has no field Math

even putting the typedef as Dynamic i get the same error.
Is it a non-feature, a known bug ? are there some solutions using Helpers or what ?
thx

native "@"

hello when assigning a basic mail adress ( obviously containing a @ )in a content .

ex mailto:[email protected]

Erazor fail to ignore it .. it' s looking for a variable named pop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.