Item12541: CALC macro doesn't support mulit-line function calls
Current State: Closed
Released In: 2.0.0
Target Release: major
The above macro will fail. The SpreadSheetPlugin
code, where builtin functions are processed recursively (_recurseFunc), uses a regular expression to match all the builtin functions, but it doesn't match multi-line functions. To make it work, just need to add a 's' option to the regular expression.
= s/\$([A-Z]+)$escToken([0-9]+)\((.*?)$escToken\2\)/_doFunc($1,$3)/geo*s*; =
Someone from DEV team, please make this change.
- 05 Jul 2013
in the meantime.
- 12 Jul 2013
, I don't really understand the example above. How does %IF process the $... spreadsheet tokens. Doesn't this need to be wrapped in the %CALC macro? Please post a fully working (or failing) example that then works when the change is applied.
The change seems simple enough to do, but I need a valid test case to ensure it doesn't break anything else. It looks like we don't have a specific test case in the SpreadSheetPluginTests
for recursive rendering. The tests all pass with the proposed change, but I'd like to add a failing test that then passes after the change.
Michael, do you have an example?
- 21 Dec 2014
Actually setting this as waiting for release. This change was picked up .. with some modifications, when I pulled in recent TWiki changes.
- 04 Jan 2015