-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix printing of indented block comments (#3225)
- Closes #3143 The formatting of block comments has changed slightly. A comment block has the syntax `{- multi-line-text -}`. The rules are: 1. The first line, i.e. the line that starts with `{-` is trimmed of trailing space. 2. The last line, i.e. the line that ends with `-}` is trimmed of prefix space. 3. Lines in the middle are trimmed of prefix and trailing space. This makes it impossible to have such a comment: ``` {- indented -} ``` The reasoning is that if we don't want to have an indentation sensitive parser we have two choices. 1. Print all comments flushed to the left 2. Do not have indentation in the middle lines. I thought 2. was better --------- Co-authored-by: Łukasz Czajka <62751+lukaszcz@users.noreply.github.com>
- Loading branch information
1 parent
5029a56
commit 936045f
Showing
3 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters