Opened 13 years ago
Closed 13 years ago
#119 closed enhancement (fixed)
match multiple instances in processTemplate()
Reported by: | sheppard | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.6.1 |
Component: | GeoMOOSE/JS | Version: | 2.6 |
Keywords: | Cc: |
Description ¶
Currently, if a template contains more than one instance of the same keyword, only the first will be matched:
GeoMOOSE.processTemplate("Hello, %name%! Nice to meet you, %name%!", {'name' : 'World'});
will return "Hello, World! Nice to meet you, %name%!".
A simple fix is to add the "global" flag to the first argument to replace().
Note:
See TracTickets
for help on using tickets.
replace all occurrences of key in processTemplate()