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

Retaining piksemel behaviour with toPrettyString() regarding single quotes vs double quotes #3

Closed
joebonrichie opened this issue Mar 31, 2024 · 4 comments

Comments

@joebonrichie
Copy link

Hi, i've noticed that this library makes a implementation change in iks_string() compared to piksemel when encountering an =

in piksemel, it was like so

while (y) {
    *t++ = ' ';
    t = my_strcat (t, IKS_ATTRIB_NAME (y), 0);
    *t++ = '=';
    *t++ = '"';
    t = escape (t, IKS_ATTRIB_VALUE (y), strlen (IKS_ATTRIB_VALUE (y)));
    *t++ = '"';
    y = y->next;
}

In this library it changes *t++ = '"'; to *t++ = '\';

Is there any reason why I couldn't carry an downstream patch to retain the previous behaviour? We have a lot of xml files written with piksemel using double quotes and changing that would create a lot of unnecessary noise in our repositories.

@Zaryob
Copy link
Owner

Zaryob commented Apr 3, 2024

Let me look guys. Its pretty time gone to lastly looked this code :)

@Zaryob
Copy link
Owner

Zaryob commented Apr 3, 2024

I see the quitely there is no change. Both " and ' are used to attributes. Look:

I probably see this and used ' instead of " to get rid of problem if the attribute value itself contains double quotes iksemel fails

@Zaryob
Copy link
Owner

Zaryob commented Sep 17, 2024

İksemel 1.6.2 published. Could you check? tag: 1.6.2

@joebonrichie
Copy link
Author

joebonrichie commented Sep 23, 2024

Thanks, i'll start testing this now.

This issue can be closed as it was only a cosmetic issue to prevent git diff noise and the change you made, makes sense.

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

2 participants