Autocorrect unenclosed strings now checks lists and starting quotation mark. - #409
Open
The32bitguy wants to merge 4 commits into
Open
The32bitguy wants to merge 4 commits into
The32bitguy wants to merge 4 commits into
Conversation
The32bitguy
marked this pull request as draft
September 15, 2026 11:12
list( varValue now have their quote marks balanced to avoid a paser error. Head" --> "Head"
Right now associative lists get malformed by this, although this can be fixed by the user if noticed.
list("wear_suit = 'icons/mob/humans/onmob/clothing/suits/suits_by_map/jungle.dmi')
turns to
list("wear_suit = 'icons/mob/humans/onmob/clothing/suits/suits_by_map/jungle.dmi')")
The32bitguy
marked this pull request as ready for review
September 16, 2026 08:44
|
i've fallen into this exact issue no less than 3 times this month. please merge this whenever convenient. |
The32bitguy
marked this pull request as draft
September 19, 2026 02:32
Associative lists no longer have a quote placed outside the brackets, (breaking the data structure). Lists are split before checking for unpaired quotes.
Author
|
Apologies for not keeping this on draft while I was iterating on it. It is ready for review now. |
The32bitguy
marked this pull request as ready for review
September 19, 2026 13:37
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
StrongDMM already corrects unenclosed strings to avoid a parsing error, but doesn't for the less common mistake of a lone quotation mark at the end, or within a list. I have personally seen at least three maps that were thought corrupted because of this.
The ' character doesn't stop maps from parsing so this PR does not correct those.
Before:
armorequip" --> armorequip"
list("Medal","Ponchos --> list("Medal","Ponchos)
list("wear_suit = 'icons/mob/humans/onmob/suit_1.dmi') = list("wear_suit = 'icons/mob/humans/onmob/suit_1.dmi')
After:
armorequip" --> "armorequip"
list("Medal","Ponchos --> list("Medal","Ponchos")
list("wear_suit = 'icons/mob/humans/onmob/suit_1.dmi') --> list("wear_suit" = 'icons/mob/humans/onmob/suit_1.dmi')
Type of change