Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text strings that contain = will not be parsed correctly #5

Open
DiscipleOfEris opened this issue May 18, 2023 · 0 comments
Open

Text strings that contain = will not be parsed correctly #5

DiscipleOfEris opened this issue May 18, 2023 · 0 comments

Comments

@DiscipleOfEris
Copy link

Actual Behavior:

When parsing the following (From Hazhalm Testing Grounds):

        RESERVATION_ENDS_MINUTES      = 8059, -- ---== Warning! ==---- Your reservation of this chamber will end in # [minute/minutes].
        RESERVATION_ENDS_SECONDS      = 8060, -- ---== Warning! ==---- Your reservation of this chamber will end in # [second/seconds].

It deletes the latter part (starting with =), leaving these entries as:

        RESERVATION_ENDS_MINUTES      = 8059, -- ---
        RESERVATION_ENDS_SECONDS      = 8060, -- ---

Running zone_texts again will just delete these lines, since they no longer match a zone text.

Expected Behavior

It should leave these entries untouched, because they are correct.

This is caused by https://github.com/LandSandBoat/UpdateExtractor/blob/main/zone_texts.py#LL238C34-L238C34

Specifically, original_line_parts = line.split("=") should be original_line_parts = line.split("=", 1) to avoid splitting on = that appear in the comment string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant