-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
attribute.QuoteType
does not output the correct quote type
#560
Comments
Hello @rvishruth , Thank you for reporting. On the good side, we output correctly without a quote when performing We will look at this issue.
I'm not sure I understand your follow-up question. Could you try again? Best Regards, Jon |
Thanks @JonathanMagnan! Sorry let me rephrase - What is the current best way to detect if an attribute's value is unquoted? |
Thank @rvishruth , now it's 100% clear. You can currently get it through reflection: var internalQuoteTypeProperty = typeof(HtmlAttribute).GetProperty("InternalQuoteType", System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
Console.WriteLine(String.Join(",", documentNodeDescendants.SelectMany(n => n.Attributes).Select(a => internalQuoteTypeProperty.GetValue(a)))); The Let me know if that solution could work for you. If yes, make sure to keep the Best Regards, Jon |
Thank you @JonathanMagnan! This makes sense! |
1. Description
attribute.QuoteType
does not output the correct quote typeIn the code below, despite setting the GlobalAttributeValueQuote property to AttributeValueQuote.Initial, the
a.QuoteType
outputs the quote types as DoubleQuote, SingleQuote, and DoubleQuote, instead of the expected None, SingleQuote, and DoubleQuote.Follow up question: Is there any way currently to detect the quote type of an attribute's value (even if it's unquoted to begin with)?
2. Exception
N/A
3. Fiddle or Project
Output:
4. Any further technical details
The text was updated successfully, but these errors were encountered: