Skip to content

Whitespace in comments removed by formatter #1087

@SylviBlossom

Description

@SylviBlossom

Simple comments such as these get formatted to remove leading whitespace:

-- a
-- 	b
--     c

-- function test()
--     print("Hello world")
-- end

After formatting:

-- a
-- b
-- c

-- function test()
-- print("Hello world")
-- end

From what I can tell, this trimming happens regardless of any comment formatting options set. The formatter documentation specifies this whitespace should be preserved:

space_after_comment_dash only inserts one space for plain comments such as --comment when there is no gap after the prefix already; comments with larger existing gaps are preserved.

This has been tested with latest release and latest build artifacts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions