Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differing AST on empty Haddock section headings #822

Open
amesgen opened this issue Nov 2, 2021 · 0 comments
Open

Differing AST on empty Haddock section headings #822

amesgen opened this issue Nov 2, 2021 · 0 comments
Labels
bug Something isn't working comments Issues related to comment placement

Comments

@amesgen
Copy link
Member

amesgen commented Nov 2, 2021

Describe the bug

The snippet

{- ***
   aaa
-}

is formatted to

-- ***
--   aaa

which has differing AST. In the first snippet, the parser detects a Haddock section heading, but not in the second one.

Expected behavior
Two options:

Environment
0.3.1.0 and latest master

Additional context
Found via #821 as a side effect, as constructs like this often appear as big comments (definitely not intended as Haddock markup):

{- *********************************************************************
*                                                                      *
                     Id keys
*                                                                      *
********************************************************************* -}
@amesgen amesgen added bug Something isn't working comments Issues related to comment placement labels Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comments Issues related to comment placement
Projects
None yet
Development

No branches or pull requests

1 participant