Browse Source

Indicate which tags are still unsupported

Evan Miller 14 years ago
parent
commit
00165a620f
2 changed files with 55 additions and 6 deletions
  1. 8 0
      README.markdown
  2. 47 6
      src/erlydtl_scanner.erl

+ 8 - 0
README.markdown

@@ -3,6 +3,14 @@ ErlyDTL
 
 ErlyDTL implements most but not all of the Django Template Language.
 
+Supported tags: autoescape, block, comment, cycle, extends, firstof, for, if, ifchanged, ifequal, ifnotequal, include, now, trans
+
+Unsupported tags: csrf_token, filter, regroup, spaceless, ssi, templatetag, url, widthratio
+
+Supported filters: add, addslashes, capfirst, center, cut, date, default, default_if_none, dictsort, dictsortreversed, divisibleby, escape, escapejs, filesizeformat, first, fix_ampersands, floatformat, force_escape, format_integer, format_number, get_digit, join, last, length, length_is, linebreaks, linebreaksbr, linenumbers, ljust, lower, make_list, phonenumeric, pluralize, pluralize, pprint, random, random_num, random_range, removetags, rjust, safe, safeseq, slice, slugify, stringformat, striptags, time, time, timesince, timesince, timeuntil, timeuntil, title, truncatewords, truncatewords_html, unordered_list, upper, urlencode, urlize, urlize, urlizetrunc, wordcount, wordwrap, yesno
+
+Unsupported filter: iriencode
+
 Project homepage: <http://code.google.com/p/erlydtl/>
 
 

+ 47 - 6
src/erlydtl_scanner.erl

@@ -57,12 +57,53 @@ scan([], Scanned, _, in_text) ->
                 fun
                     ({identifier, Pos, String}) ->
                         RevString = lists:reverse(String),
-                        Keywords = ["for", "empty", "endfor", "in", "include", "block", "endblock",
-                            "extends", "autoescape", "endautoescape", "if", "else", "endif",
-                            "not", "or", "and", "comment", "endcomment", "cycle", "firstof",
-                            "ifchanged", "ifequal", "endifequal", "ifnotequal", "endifnotequal",
-                            "now", "regroup", "spaceless", "endspaceless", "ssi", "templatetag",
-                            "load", "call", "with", "trans", "noop"], 
+                        Keywords = [
+                            "autoescape", "endautoescape", 
+
+                            "block", "endblock", 
+
+                            "comment", "endcomment", 
+
+                            %TODO "csrf_token",
+                            
+                            "cycle", 
+                            
+                            "extends", 
+
+                            %TODO "filter", "endfilter",
+
+                            "firstof",
+
+                            "for", "in", "empty", "endfor", 
+
+                            "if", "else", "endif", "not", "or", "and", 
+
+                            "ifchanged", 
+                            
+                            "ifequal", "endifequal", 
+
+                            "ifnotequal", "endifnotequal",
+
+                            "include", 
+
+                            "now", 
+
+                            %TODO "regroup", 
+                            
+                            %TODO "spaceless", "endspaceless", 
+                            
+                            %TODO "ssi", 
+                            
+                            %TODO "templatetag",
+
+                            %TODO "url",
+
+                            %TODO "widthratio",
+
+                            "call", "with", %TODO "endwith",
+                            
+                            "trans", "noop"
+                        ], 
                         Type = case lists:member(RevString, Keywords) of
                             true ->
                                 list_to_atom(RevString ++ "_keyword");