I have been playing around with Elm-Markup and found it is for my purposes a big step forward from Markdown. However, there is one issue, there is a known bug that when the markup parser is fed a single ‘{’ character, the app gets stuck in an infinite loop ( Ellie demo). I thought it could be a nice exercise to improve my understanding of parsers by trying to fix the bug, however I got stuck on two issues:
-
It seems that the source code of “elm-markup” on packages.elm.org and the github repo are not the same. I can compile the examples only, if I replace the examples elm.json and supply them with the “official” package instead of that of the Github repo, so something got out of sync?
-
Is there a clever strategy to debug these type of infinite loops? My intuition is to search for whatever parser deals with ‘{’ chars and test them one by one. Does anybody have a hint on what functions within elm/Parser are likely to trigger infinite loops?