AvaloniaUI/AvaloniaVS

TextBlock/Run Formatter problem

strangerinla opened this issue · 2 comments

There are also formatter problems:
It formats the string <Run Text="123"/><Run Text="456"/> into separate lines which results in extra space between runs in output.
It would also be cool to have hyperlink.

Originally posted by @strangerinla in #417 (reply in thread)

How to repeat this:

  1. Create TextBlock wtih several <Run> elements in single line

  2. Build and run the project - TextBlock displays concatenation of Runs' text properties. No space between texts.
    изображение

  3. Execute "Format Document" command on axaml file edited in step 1 - <Run> controls split in different lines

  4. Build and run the project - TextBlock content differs from step 2: text properties are separated by space
    изображение

The key problem here is the formatter logic. Row <Run/><Run/> should not be formatted as <Run/>\n<Run/> as it produces different output result.

I don't think we provide any formatting tools build-in the plugin.

Probably Visual Studio tries to force its own XML formatted here