XamlStyler icon indicating copy to clipboard operation
XamlStyler copied to clipboard

">" problem in Rider

Open NiroEnvy opened this issue 1 year ago • 6 comments

Describe the bug I'm trying to format my axaml pages with Avalonia and when I try to apply a style it incorrectly formats the styles where ">" is used

To Reproduce

  1. When formatting any style line with ">" it change it to ">"

Expected behavior ">" should remain unchanged

Screenshots Before: image

After: image

Version Info :

  • OS: Windows 10
  • Rider (2024.1.4)
  • XAML Styler: 3.2404.4.0
  • Avalonia 11.0.11

NiroEnvy avatar Jul 08 '24 14:07 NiroEnvy

This is a possible candidate for surfacing in some sort of error/warning UI in the future as part of #271, but there is a case to consider this otherwise by design due to XAML language spec. Here is some more information on XML Character Entities and XAML. Is this a delta between XAML language spec and AXAML?

grochocki avatar Jul 09 '24 00:07 grochocki

This is a possible candidate for surfacing in some sort of error/warning UI in the future as part of #271, but there is a case to consider this otherwise by design due to XAML language spec. Here is some more information on XML Character Entities and XAML. Is this a delta between XAML language spec and AXAML?

There were no problems on the last version (2023.3.1 rider) and (N, last for 2023 rider i think) version of styler However, just after the update, this problem appeared. I am also not sure that there may be some delta here, however I do not have enough knowledge to answer this question. Avalonia version unchanged

I also thought the problem was in my configuration but reinstalling the plugin also didn't help.

Also, it happens only for "Style" section. Close brackets remain fine.

NiroEnvy avatar Jul 09 '24 10:07 NiroEnvy

Hmm, interesting. Thanks for the info; will need to investigate further.

grochocki avatar Jul 10 '24 05:07 grochocki

Yes, Avalonia XAML is not valid XML in styles.

colejohnson66 avatar Sep 24 '24 13:09 colejohnson66

that would be a life saver to have an option to don't process this char while formating....

Enhakiel avatar Dec 04 '24 01:12 Enhakiel

My problem is the same, this bug is still present in XAML Styler v3.2504.1.0. I think the best would be to add a new setting: "Process ">" characters" with a bool value. Will it be fixed? Maybe it is not a big feature request anyway.

laszlojasko avatar May 17 '25 22:05 laszlojasko