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

Multiple New Tree Blocks are Overwritten

Evelios opened this issue · comments

When creating two or more Mark.tree blocks within a single document using Mark.manyOf , then the first tree is used for both when parsing the emu file. For example if you have two mark blocks List and Tree, with the block name |> List and |> Tree respectively, then you can only make blocks using those two names as confirmed by the compiler. However, the first item in your manyOf is what is used when the document is actually parsed. For example if you are using Mark.manyOf [ list, tree ] then all |> Tree elements within a document are then are parsed as List elements. The reverse then happend if you do Mark.manyOf [ tree, list ]

I assume this repo is no longer being worked on but I can confirm that I am facing the same issue - when trying to get multiple blocks parsed, whichever tree block is mentioned first will overwrite any others.