forked from MapComplete/MapComplete
Fix: substituteKeys works correctly if newline is in the text, fix 'send email to report broken'-button by porting it to svelte
This commit is contained in:
parent
2bbf966d22
commit
b4f65bf2f7
3 changed files with 137 additions and 95 deletions
|
@ -442,6 +442,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
* Utils.SubstituteKeys("abc{def}ghi", {def: 'XYZ'}) // => "abcXYZghi"
|
||||
* Utils.SubstituteKeys("abc{def}{def}ghi", {def: 'XYZ'}) // => "abcXYZXYZghi"
|
||||
* Utils.SubstituteKeys("abc{def}ghi", {def: '{XYZ}'}) // => "abc{XYZ}ghi"
|
||||
* Utils.SubstituteKeys("abc\n\n{def}ghi", {def: '{XYZ}'}) // => "abc\n\n{XYZ}ghi"
|
||||
*
|
||||
* @param txt
|
||||
* @param tags
|
||||
|
@ -456,7 +457,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
|
|||
if (txt === undefined) {
|
||||
return undefined
|
||||
}
|
||||
const regex = /(.*?){([^}]*)}(.*)/
|
||||
const regex = /(.*?){([^}]*)}(.*)/s
|
||||
|
||||
let match = txt.match(regex)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue