Skip to content

Commented lines not formatting properly in sitemaps #13

@scatterthought

Description

@scatterthought

Expected Behavior

When I use the new feature to reformat a sitemap, items that I have commented out should be formatted to match the indenting of the items adjacent to them.

Current Behavior

In 1.3.12, items that are commented out are split onto separate lines, leaving an empty comment and reactivating the items. It seems that the formatter is keying on the device type (e.g. "Switch") to determine when to create a new line.

Possible Solution

Perhaps it would be possible to have the reformatting completely ignore comments?

Steps to Reproduce (for Bugs)

This code:

// Switch item=Flag_Test label="Test Switch" icon="door"

Becomes this:

//
Switch item=Flag_Test label="Test
Switch" icon="door"

Context

I'm just testing this out of interest more than need.

Your Environment

I'm using the 1.3.12 version of the alignment tool. VSCode is up to date in Windows 10.

Metadata

Metadata

Assignees

Labels

.sitemapbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions