Просмотр исходного кода

Merge pull request #390 from tsloughter/mustache_bug

fix }}} bug in mustache
pull/394/head
Fred Hebert 10 лет назад
Родитель
Сommit
0883a6eca7
1 измененных файлов: 1 добавлений и 1 удалений
  1. +1
    -1
      src/rebar_mustache.erl

+ 1
- 1
src/rebar_mustache.erl Просмотреть файл

@ -84,7 +84,7 @@ render(Mod, CompiledTemplate, Ctx) ->
pre_compile(T, State) -> pre_compile(T, State) ->
SectionRE = "\{\{\#([^\}]*)}}\s*(.+?){{\/\\1\}\}\s*", SectionRE = "\{\{\#([^\}]*)}}\s*(.+?){{\/\\1\}\}\s*",
{ok, CompiledSectionRE} = re:compile(SectionRE, [dotall]), {ok, CompiledSectionRE} = re:compile(SectionRE, [dotall]),
TagRE = "\{\{(#|=|!|<|>|\{)?(.+?)\\1?\}\}+",
TagRE = "\{\{(#|=|!|<|>|\{)?(.+?)\\1?\}\}",
{ok, CompiledTagRE} = re:compile(TagRE, [dotall]), {ok, CompiledTagRE} = re:compile(TagRE, [dotall]),
State2 = State#mstate{section_re = CompiledSectionRE, tag_re = CompiledTagRE}, State2 = State#mstate{section_re = CompiledSectionRE, tag_re = CompiledTagRE},
"fun(Ctx) -> " ++ "fun(Ctx) -> " ++

Загрузка…
Отмена
Сохранить