Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Enable negative numbers in filters like "if" #66

Closed
wants to merge 1 commit into from

2 participants

@sebastiencv

For instance :
{% if var1 > -3 %}

@evanmiller
Owner

Thanks for bringing this issue to my attention. I've committed a stricter version of your patch:

4ebc069

@evanmiller evanmiller closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 19, 2013
  1. @sebastiencv

    Enable negative numbers in filters like "if".

    sebastiencv authored
    For instance :
    {% if var1 > -3 %}
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/erlydtl_scanner.erl
View
2  src/erlydtl_scanner.erl
@@ -289,7 +289,7 @@ append_text_char(Scanned, {Row, Column}, Char) ->
char_type(C) when ((C >= $a) andalso (C =< $z)) orelse ((C >= $A) andalso (C =< $Z)) orelse (C == $_) ->
letter_underscore;
-char_type(C) when ((C >= $0) andalso (C =< $9)) ->
+char_type(C) when ((C >= $0) andalso (C =< $9) orelse (C =:= $-)) ->
digit;
char_type(_C) ->
undefined.
Something went wrong with that request. Please try again.