Only compile files with .html extension. #39

Merged
merged 2 commits into from Aug 16, 2012
Jump to file or symbol
Failed to load files and symbols.
+3 −1
Split
View
@@ -117,7 +117,9 @@ compile_dir(Dir, Module) ->
compile_dir(Dir, Module, Options) ->
Context = init_dtl_context_dir(Dir, Module, Options),
- Files = filelib:fold_files(Dir, ".*", true, fun(F1,Acc1) -> [F1 | Acc1] end, []),
+ %% Find all files in Dir (recursively), matching the regex (no
+ %% files ending in "~").
+ Files = filelib:fold_files(Dir, ".+[^~]$", true, fun(F1,Acc1) -> [F1 | Acc1] end, []),
{ParserResults, ParserErrors} = lists:foldl(fun
(File, {ResultAcc, ErrorAcc}) ->
case filename:basename(File) of