stoeffel / elm-verify-examples

BSD 3-Clause "New" or "Revised" License
167 stars 14 forks source link

only the last code block in Markdown gets tests generated for it #88

Open BrianHicks opened 4 years ago

BrianHicks commented 4 years ago

I have a document which simplifies to the following:

```elm
import Json.Decode as Decode

Decode.decodeString Decode.int "1"
--> Ok 1
```

```elm
1 + 2
--> 3
```

In this document, elm-verify-examples 4.0.1 will only generate tests for the 1 + 2 block, not the Json.Decode block. Further, it totally skips this block regardless of where it lands in the document:

```elm
add : Int -> Int -> Int
add x y =
    x + y

add 1 2
--> 3
```

I'm happy to help, either with more info about my use case (parsing/verifying all the code examples in a book) or a fix.