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

Review Attribute QuoteType Behavior vs InternalQuoteType fixes #552, #516 #554

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

POFerro
Copy link
Contributor

@POFerro POFerro commented Jun 21, 2024

Hi :),

I just faced an issue where adhoc created attributes where allways being quoted SingleQuote despite having QuoteType set to DoubleQuote as described in #552
When looking at the code I realized some inconsistencies in the behavior of InternalQuoteType vs QuoteType.
As such here is my proposed behavior for these properties:

  1. InternalQuoteType is the QuoteType inferred by the system when reading the document or on Value set ( ex: Value being set for atribute with WithoutValue )
  2. QuoteType is the value set by the user that overrides the Internal calculated value, except if the value is being set to Initial wich rolls back the QuoteType to the internal value

With this behavior I believe we can have a consistent and intuitive way of handling quotes in attributes
All public behavior of the classes was kept untouched so there should not be any breaking change ( ex: Global setting in the document still overrides any of these attributes )

Please consider this change since I believe it fixes #552 and #516 and makes attribute quoting much more intuitive.

Thanks and best regards
POFerro

@POFerro
Copy link
Contributor Author

POFerro commented Jul 23, 2024

Hi @JonathanMagnan ,

This PR also solves #560, have you had a chance to look at it?

Thanks and best regards
POFerro

@JonathanMagnan
Copy link
Member

Hello @POFerro ,

I wanted to let you know that I have started looking at your PR, and so far, everything looks perfect.

I will make a second review later this week (I will try tomorrow, but I cannot yet guarantee it) and release a new version just after.

So it should be soon in production ;)

Best Regards,

Jon

@JonathanMagnan JonathanMagnan merged commit 814af63 into zzzprojects:master Jul 31, 2024
JonathanMagnan added a commit that referenced this pull request Jul 31, 2024
@POFerro POFerro deleted the quote_type branch August 9, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Creating empty value for attributte
2 participants