Skip to content

fix: strip whitespace from all plural values in handle_plural_values#284

Open
lil-aditya wants to merge 1 commit intofireform-core:mainfrom
lil-aditya:fix_error
Open

fix: strip whitespace from all plural values in handle_plural_values#284
lil-aditya wants to merge 1 commit intofireform-core:mainfrom
lil-aditya:fix_error

Conversation

@lil-aditya
Copy link

@lil-aditya lil-aditya commented Mar 18, 2026

Summary

Refactored the handle_plural_values() method to simplify plural value parsing and whitespace handling.

Problem

The previous implementation used a manual loop to remove leading whitespace after splitting the string:

values = plural_value.split(";")

for i in range(len(values)):
    current = i + 1
    if current < len(values):
        clean_value = values[current].lstrip()
        values[current] = clean_value

Fixes #283

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

Successfully merging this pull request may close these issues.

Refactor handle_plural_values() to simplify whitespace handling when parsing plural values

1 participant