diff options
author | Lars Knoll <lars.knoll@qt.io> | 2019-01-22 13:38:44 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2019-01-25 21:55:55 +0000 |
commit | cf04d5ee18344d45da538810654690bd3936f46a (patch) | |
tree | f3d2f81f54865d2ce713407490d48bd0549c4e98 /.gitignore | |
parent | f4ab0ab62496e63db72592845b285bab3d8388b9 (diff) |
Bring behavior of String.replace() in line with other engines
"x".replace("x", "$1") gives "$1" in both JSC and V8, as there are
no captures that could be used as a replacement for $1. Implement
the same behavior as it's the most logical thing to do (even though
it's undefined according to the spec).
Two digit captures ($nm) work in a way that they get applied if
$nm captures exist. If there are less than nm but more than n captures
available $n is replaced by the n'th capture and m is copied over
verbatim.
Change-Id: I8b5f576f2c42c8334859ab7854dcdf07104dd35b
Fixes: QTBUG-73152
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions