-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for preserving empty lines (#31)
* First, very opinionated, version * Add support for preserving empty lines
- Loading branch information
Brujo Benavides
authored
Dec 12, 2019
1 parent
59fec27
commit b6d37dc
Showing
8 changed files
with
184 additions
and
21 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-module(empty_lines). | ||
|
||
-compile(export_all). | ||
|
||
-format([{inline_expressions, false}, {preserve_empty_lines, true}]). | ||
|
||
in_this() -> | ||
function, | ||
there:are(no, empty, lines). | ||
|
||
this_function() -> | ||
has:two(), | ||
|
||
empty:lines(), | ||
first:one(wont, be, preserved). | ||
|
||
here() -> | ||
we:have(many), | ||
|
||
empty:lines(), | ||
|
||
but:only(two, should), | ||
be:preserved(). | ||
|
||
empty(Lines) -> | ||
should:nt(be, preserved, if_they:appear(within, a:single(expression))), | ||
but:we_preserve(Lines), | ||
|
||
between:them(). | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-module(inline_expressions). | ||
|
||
-compile(export_all). | ||
|
||
-format([{inline_expressions, false}]). | ||
|
||
these() -> | ||
Expressions = should:occupy(), | ||
a, | ||
line, | ||
each; | ||
these() -> | ||
other, | ||
expressions, | ||
too. | ||
|
||
also() -> | ||
these, | ||
two. | ||
|
||
even() -> | ||
when_they:are(small), | ||
enough:to(fit). | ||
|
||
white() -> | ||
lines:should(not be:preserved()), | ||
Since = preserve_empty_lines:is(false). | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
-module(empty_lines). | ||
|
||
-compile(export_all). | ||
|
||
-format([{inline_expressions, false}, {preserve_empty_lines, true}]). | ||
|
||
in_this() -> function, there:are(no, empty, lines). | ||
|
||
this_function() -> | ||
|
||
has:two(), | ||
|
||
empty:lines(), first:one(wont, be, preserved). | ||
|
||
here() -> | ||
we:have(many), | ||
|
||
|
||
|
||
|
||
empty:lines(), | ||
|
||
|
||
but:only(two, should), | ||
be:preserved(). | ||
|
||
empty(Lines) -> | ||
should:nt( | ||
be, | ||
|
||
preserved, if_they:appear( | ||
within, | ||
|
||
a:single(expression))), | ||
|
||
but:we_preserve(Lines), | ||
|
||
between:them(). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-module(inline_expressions). | ||
|
||
-compile(export_all). | ||
|
||
-format([{inline_expressions, false}]). | ||
|
||
these() -> Expressions = should:occupy(), a, line, each; | ||
|
||
these() -> | ||
other, | ||
expressions, | ||
too. | ||
|
||
also() -> these, two. | ||
even() -> when_they:are(small), enough:to(fit). | ||
|
||
white() -> | ||
lines:should(not be:preserved()), | ||
|
||
Since = preserve_empty_lines:is(false). |