-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1048 from tweag/pretty-printer-doc-metadata
Add multiline doc logic to the pretty printer
- Loading branch information
Showing
3 changed files
with
54 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
field | doc m%%" | ||
Contract to enforce the value is a string that represents a boolean literal. Additionally casts "True" to "true" | ||
and "False" to "false". This shouldn't interpolate: %{null} | ||
|
||
For example: | ||
```nickel | ||
("True" | BoolLiteral) => | ||
"true" | ||
("hello" | BoolLiteral) => | ||
error | ||
(true | BoolLiteral) => | ||
error | ||
``` | ||
"%% | ||
= 1 | ||
} |
21 changes: 21 additions & 0 deletions
21
tests/snapshot/snapshots/snapshot__pretty_multiline_doc.ncl.snap
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,21 @@ | ||
--- | ||
source: tests/snapshot/main.rs | ||
expression: snapshot | ||
--- | ||
{ | ||
field | doc | ||
m%%" | ||
Contract to enforce the value is a string that represents a boolean literal. Additionally casts "True" to "true" | ||
and "False" to "false". This shouldn't interpolate: %{null} | ||
|
||
For example: | ||
```nickel | ||
("True" | BoolLiteral) => | ||
"true" | ||
("hello" | BoolLiteral) => | ||
error | ||
(true | BoolLiteral) => | ||
error | ||
```"%% | ||
= 1, | ||
} |