RobertDober / earmark_parser

The Markdown to AST part of Earmark.
Apache License 2.0
68 stars 26 forks source link

Strikethrough not parsed when `breaks: true` option is used #123

Closed mayel closed 1 year ago

mayel commented 1 year ago

See https://github.com/RobertDober/earmark_parser/compare/master...mayel:earmark_parser:strikethrough-with-breaks

RobertDober commented 1 year ago

Maybe you can tell me what happens too?

mayel commented 1 year ago

How do you mean?

RobertDober commented 1 year ago

Well you posted a link to a test you added, I suppose it fails, but I need to know. If you can make a PR even if it is only a failing test it would help, thx

mayel commented 1 year ago

It does indeed fail:

  1) test single occurrence in the middle of some text, with `breaks: true` (Acceptance.Ast.DelTest)
     test/acceptance/ast/del_test.exs:31
     Assertion with == failed
     code:  assert as_ast(markdown, breaks: true) == {:ok, ast, messages}
     left:  {:ok, [{"p", [], ["Some deleted ~~old text~~ here"], %{}}], []}
     right: {:ok, [{"p", [], ["Some deleted ", {"del", [], ["old text"], %{}}, " here"], %{}}], []}
     stacktrace:
       test/acceptance/ast/del_test.exs:36: (test)

See PR #124