Actions
Defect #11736
closedNew multi-line macros regexp (MACROS_RE) is too eager
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Using trunk (pre-2.1.0) version, Ruby 1.9.3 (Windows)
Tried latest macros feature: multi-line macros. I wrote macro, called !{{lang}} to display different blocks of text depending of which locale is active.
See the example, that produce a bug:
{{lang(ru) Some russian text }} {{lang(en) Some english text }}
According to MACROS_RE, it should extract exactly two macro appearances. However, it extracts only one macro with this body:
Some russian text }} {{lang(en) Some english text
Attached a patch to fix this bug.
Note also another small change in the patch: "unless const_defined?(:MACRO_SUB_RE)*, instead of "unless const_defined?(:MACROS_SUB_RE)" in application_helper.rb
Files
Actions