Descriptive Problem Summary:
The DreamMaker Regex replace system will not replace some capture groups correctly when using "Replace All" instead of just "Replace".
Numbered Steps to Reproduce Problem:
1. Open up the /vg/station codebase.
2. Search for the following regex :
(?<=overlays)\s*([+\-]?=)\s*("[A-Za-z0-9_-]+")
3. Enter the following regex to replace with
$1 image(icon = icon, icon_state = $2)
4. Hit Replace a few times - notice the first capture group, which is +=, -=, or =, is preserved in the replace, and the second capture group, the string, is also preserved.
5. Hit Replace All.
6. Find that += and -= have not been preserved, and that they are all now one or the other, and the strings for every instance that has a changed operator is now the same string.
Code Snippet (if applicable) to Reproduce Problem:
Expected Results:
The Replace-All button would correctly find and use the conditional capture group in every match.
Actual Results:
The Replace-All button does not match conditional regexes correctly.
Does the problem occur:
Every time? Or how often?
Every time.
In other games?
n/a
In other user accounts?
Not tested.
On other computers?
Not tested.
When does the problem NOT occur?
When using Replace individually.
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Not tested.
Workarounds:
Hit Replace manually for each instance, which ruins the possibility of mass-replace using DM.
ID:2103065
Jun 19 2016, 6:23 pm
|
|||||||||||||
| |||||||||||||