Skip to content

Autocorrect unenclosed strings now checks lists and starting quotation mark. - #409

Open
The32bitguy wants to merge 4 commits into
SpaiR:mainfrom
The32bitguy:string-bin
Open

The32bitguy wants to merge 4 commits into
SpaiR:mainfrom
The32bitguy:string-bin

Conversation

@The32bitguy

@The32bitguy The32bitguy commented Sep 15, 2026

Copy link
Copy Markdown

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

  • Minor changes or tweaks (quality of life stuff)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@SpaiR SpaiR added the feat New feature or request label Sep 15, 2026
@The32bitguy
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 The32bitguy changed the title Autocorrect unenclosed strings now checks for starting quotation mark. Autocorrect unenclosed strings now checks lists and starting quotation mark. Sep 15, 2026
@The32bitguy
The32bitguy marked this pull request as ready for review September 16, 2026 08:44
@StarHorder

Copy link
Copy Markdown

i've fallen into this exact issue no less than 3 times this month. please merge this whenever convenient.

@The32bitguy
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.
@The32bitguy

Copy link
Copy Markdown
Author

Apologies for not keeping this on draft while I was iterating on it. It is ready for review now.

@The32bitguy
The32bitguy marked this pull request as ready for review September 19, 2026 13:37

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants