Skip to content

indented #if directive inside another non-indented #if directive drops significant whitespace #1866

@kentcb

Description

@kentcb

Issue created from fantomas-online

Code

#if FOO

    #if BAR

    #endif

#endif

Result

#if FOO

#ifBAR

#endif

#endif

Problem description

The whitespace between the inner #if and BAR is dropped, resulting in invalid code.

Extra information

  • The formatted result breaks by code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this. A PR is incoming.

Options

Fantomas Master at 08/11/2021 17:06:14 - 383b729

Default Fantomas configuration

Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?

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