mdgriffith / elm-markup

Elm-friendly markup

Home Page:https://package.elm-lang.org/packages/mdgriffith/elm-markup/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A manyOf block after a multiline in startWith always requires at least one child

tad-lispy opened this issue · comments

It seems that manyOf after multiline in a startWith blick always needs at least one child block. I'd expect to get an empty list when there is no children. Consider this block:

block "Parent" List.singleton <|
    startWith Tuple.pair
        (block "Start" identity multiline)
        (manyOf [ stub "Next" "next value"])

I want something like this

| Parent
    | Start
        first value
    | Next
    | Next

to produce

[( "first value", [ "next value", "next value" ])]

and

| Parent
    | Start
        only the first value

to produce

[( "only the first value", [] )]

What I'm getting instead is a dead end ExpectingIndent 4 on the line after | Start.

See https://ellie-app.com/4vXk9S3tDYXa1

I believe this is resolved in v3, thanks!