-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
79ca83c
commit ea2b4bd
Showing
4 changed files
with
86 additions
and
43 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 |
---|---|---|
@@ -1,25 +1,28 @@ | ||
* Quisque finibus tellus non molestie porta. In non posuere metus, vitae tincidunt enim. Nam quis elit pharetra, elementum elit lacinia, efficitur nibh. Cras | ||
lobortis neque sed ante ornare rutrum. Maecenas sed urna nisl. Phasellus aliquam finibus ex vitae iaculis. Vestibulum ante ipsum primis in faucibus orci luctus | ||
et ultrices posuere cubilia curae; Suspendisse eget tortor eget sapien tincidunt vestibulum eu a velit. Pellentesque eu tortor ut lectus sodales ornare. | ||
lobortis neque sed ante ornare rutrum. Maecenas sed urna nisl. Phasellus aliquam finibus ex vitae iaculis. Vestibulum ante ipsum primis in faucibus orci | ||
luctus et ultrices posuere cubilia curae; Suspendisse eget tortor eget sapien tincidunt vestibulum eu a velit. Pellentesque eu tortor ut lectus sodales | ||
ornare. | ||
|
||
* Quisque finibus tellus non molestie porta. In non posuere metus, vitae tincidunt | ||
enim. Nam quis elit pharetra, elementum elit lacinia, efficitur nibh. Cras | ||
lobortis neque sed ante ornare rutrum. Maecenas sed urna nisl. Phasellus aliquam | ||
finibus ex vitae iaculis. Vestibulum ante ipsum primis in faucibus orci luctus | ||
et ultrices posuere cubilia curae; Suspendisse eget tortor eget sapien tincidunt | ||
vestibulum eu a velit. Pellentesque eu tortor ut lectus sodales ornare. | ||
* Quisque finibus tellus non molestie porta. In non posuere metus, vitae | ||
tincidunt enim. Nam quis elit pharetra, elementum elit lacinia, efficitur | ||
nibh. Cras lobortis neque sed ante ornare rutrum. Maecenas sed urna nisl. | ||
Phasellus aliquam finibus ex vitae iaculis. Vestibulum ante ipsum primis in | ||
faucibus orci luctus et ultrices posuere cubilia curae; Suspendisse eget | ||
tortor eget sapien tincidunt vestibulum eu a velit. Pellentesque eu tortor ut | ||
lectus sodales ornare. | ||
|
||
* Quisque finibus tellus non molestie | ||
porta. In non posuere metus, vitae | ||
tincidunt enim. Nam quis elit pharetra, | ||
elementum elit lacinia, efficitur nibh. | ||
Cras lobortis neque sed ante ornare | ||
rutrum. Maecenas sed urna nisl. | ||
Phasellus aliquam finibus ex vitae | ||
iaculis. Vestibulum ante ipsum primis in | ||
faucibus orci luctus et ultrices posuere | ||
cubilia curae; Suspendisse eget tortor | ||
eget sapien tincidunt vestibulum eu a | ||
velit. Pellentesque eu tortor ut lectus | ||
tincidunt enim. Nam quis elit | ||
pharetra, elementum elit lacinia, | ||
efficitur nibh. Cras lobortis neque | ||
sed ante ornare rutrum. Maecenas sed | ||
urna nisl. Phasellus aliquam finibus | ||
ex vitae iaculis. Vestibulum ante | ||
ipsum primis in faucibus orci luctus | ||
et ultrices posuere cubilia curae; | ||
Suspendisse eget tortor eget sapien | ||
tincidunt vestibulum eu a velit. | ||
Pellentesque eu tortor ut lectus | ||
sodales ornare. | ||
|
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,3 @@ | ||
abcedefg 0 9 0 40 80 | ||
abcedefg | ||
1 5 5 3 10 |
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,27 @@ | ||
module DodoWithPosition where | ||
|
||
import Prelude | ||
|
||
import Data.Foldable (intercalate) | ||
import Dodo (Doc, align, paragraph, plainText, print, text, twoSpaces, withPosition) | ||
import Effect (Effect) | ||
import Effect.Class.Console as Console | ||
|
||
test1 :: forall a. Doc a | ||
test1 = | ||
paragraph | ||
[ text "abcedefg" | ||
, align 5 $ withPosition \pos -> | ||
text $ intercalate " " | ||
[ show pos.line | ||
, show pos.column | ||
, show pos.indent | ||
, show pos.ribbonWidth | ||
, show pos.pageWidth | ||
] | ||
] | ||
|
||
main :: Effect Unit | ||
main = do | ||
Console.log $ print plainText (twoSpaces { ribbonRatio = 0.5 }) test1 | ||
Console.log $ print plainText (twoSpaces { ribbonRatio = 0.5, pageWidth = 10 }) test1 |