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

Few parse_ini_config_file() fixes #127

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gportay
Copy link
Contributor

@gportay gportay commented Feb 27, 2024

Hello,

This fixes some issues found in the mechanism of ini-translation-to-bash.

I am a bit worry if the fix about the removal of (single) space before sign =, or after sign = (but not both) and if true tabulation before and after the sign = will break things to users since it never worked.

Maybe, we could simply drops that feature of stripping (single) whitespaces arround =.

What do you think?

This fixes comment misalignment.
This fixes a typo in a comment; the variable expansion intends to remove
tabulation after the sign =.
The variable expansions intend to remove the tabulations before and
after the sign =, as per the comment.

However, the patterns match several spaces instead of a tabulation
(probably because of a copy/paste at code import).

This fixes the mismatch variable expansion by replacing the sequence of
spaces (backslash included) by a the single quoted string composed of
the ANSI escaped tabulation character (i.e. $'\t').
The removal of tabulation arround the sign = is perform by two variable
expansions:
 - remove tabulation before the sign =
 - remove tabulation after the sign =

This applies the same procedure to space by splitting the single removal
into two variable expansions: one before the sign =, one after the sign
=.
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.

1 participant