DevToys icon indicating copy to clipboard operation
DevToys copied to clipboard

Incorrect amount of "lines" in XML formatter

Open tbeest opened this issue 1 year ago • 5 comments

Current behavior

Incorrect amount of "lines" when switching the indentation to 4 spaces in the XML formatter output. Meanwhile it doesn't appear to properly recognize two spaces in the input.

How to reproduce it (as minimally and precisely as possible)

image

Expected behavior

I would expect the divider lines to match the provided, if not in-, at least the selected output

Screenshots

No response

Workaround

No response

Affected platforms

Windows

Affected DevToys kind

DevToys (app with GUI)

DevToys Version

Version 1.0.12.0 | X64 | RELEASE | 94bb8213 | 94bb8213

Relevant Assets/Logs

No response

tbeest avatar Jun 05 '23 10:06 tbeest

This issue also exists with json, but there the lines are always at 4 spaces regardless of what the indentation is set to.

tbeest avatar Jun 20 '23 07:06 tbeest

Hi,

I'm not sure to understand the behavior that you expect. Would you like to preserve the 2 extra spaces in that are in addition to the 2 spaces indentation in the input?

veler avatar Aug 06 '23 01:08 veler

image On the left side you can see how the vertical bars are correctly indented at once every four spaces. On the right, however, the vertical bars are at once every two spaces. They don't dynamically adjust to the selected indentation of four spaces and always remain at two.

Json files have the same issue in reverse, where the vertical bars are always set for an indentation of four spaces.

tbeest avatar Sep 21 '23 14:09 tbeest

Oooooh I see! That's probably because Monaco Editor (the code editor we use) is configured to use a 2 space indentation instead of 4. Good catch!

veler avatar Sep 25 '23 01:09 veler