Skip to content

Commit 9aa10b5

Browse files
committed
Update README.md
1 parent 5e15242 commit 9aa10b5

File tree

4 files changed

+49
-3
lines changed

4 files changed

+49
-3
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.cabal linguist-generated=true

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,51 @@ Run it like so:
8989

9090
$ cabal configure --enable-tests && cabal build && cabal test
9191

92+
## Reordering code blocks
93+
94+
Code blocks that are tagged with `top` are moved to the beginning of the source
95+
file.
96+
97+
**Example:**
98+
99+
## Introduction
100+
101+
```haskell top
102+
{-# LANGUAGE OverloadedStrings #-}
103+
module MyModule where
104+
```
105+
106+
## Working with textual data
107+
108+
```haskell top
109+
import qualified Data.Text as Text
110+
```
111+
```haskell
112+
-- |
113+
-- >>> foo
114+
-- 3
115+
foo :: Int
116+
foo = Text.length "foo"
117+
```
118+
119+
## Working with binary data
120+
121+
```haskell top
122+
import qualified Data.ByteString as ByteString
123+
```
124+
```haskell
125+
-- |
126+
-- >>> bar
127+
-- 3
128+
bar :: Int
129+
bar = ByteString.length "foo"
130+
```
131+
132+
~~~
133+
$ doctest -pgmL markdown-unlit MyModule.lhs
134+
Examples: 2 Tried: 2 Errors: 0 Failures: 0
135+
~~~
136+
92137
## Customizing
93138

94139
By default, `markdown-unlit` extracts all code that is marked with `haskell`,

markdown-unlit.cabal

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: markdown-unlit
2-
version: 0.5.1
2+
version: 0.6.0
33
synopsis: Literate Haskell support for Markdown
44
category: Development
55
license: MIT

0 commit comments

Comments
 (0)