Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitlouy committed Aug 21, 2020
1 parent 330e051 commit 07e9b56
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ Indentation aware string interpolation.
To include indent in your project

```scala
libraryDependencies += "com.github.benoitlouy" %% "indent" % "0.3.0"
libraryDependencies += "com.github.benoitlouy" %% "indent" % "0.4.0"
```
## Usage

```scala
import indent._
Expand Down Expand Up @@ -71,6 +72,26 @@ doc.indentWith(" ")
// Indented list
// - item 1
// - item 2"""

// an indented block can also be generated from a sequence of Indented
val indentedBlocks = Vector(
indent""" 1. First Entry
| Content""",
indent""" 2. Second Entry
| Other Content"""
).indented
// indentedBlocks: Indented = •1. First Entry
// ••Content
// •2. Second Entry
// ••Other Content

indent"""Header
| $indentedBlocks"""
// res2: Indented = Header
// ••1. First Entry
// •••Content
// ••2. Second Entry
// •••Other Content
```

The library provides instances for tab, 2 and 4 space indentation.
Expand Down

0 comments on commit 07e9b56

Please sign in to comment.