pragdave / earmark

Markdown parser for Elixir
Other
860 stars 135 forks source link

[earmark] Unbreak compilation in Elixir 1.11 #423

Closed ypisetsky closed 2 years ago

ypisetsky commented 2 years ago

It seems like the Elixir 1.11 parser gets confused by this

> mix compile
Compiling 14 files (.ex)

== Compilation error in file lib/earmark/transform.ex ==
** (SyntaxError) lib/earmark/transform.ex:134:1: invalid location for heredoc terminator, please escape token or move it to its own line: """
    (elixir 1.11.4) lib/kernel/parallel_compiler.ex:314: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7
ypisetsky commented 2 years ago

It would be good to have this so that we could unpin our projects which are still using Elixir 1.11 from being stuck on 1.4.15 (this is a new regression in 1.4.16)

RobertDober commented 2 years ago

Thanks a lot for this but there seems to problem with 1.12 now 😠 (not really), I'll try to install 1.11 again, that's a hussle though. Was it 1.12 that introduced the ~S""" syntax? If so I just have to fall back and escape a ton of ", and I mean a ton.

RobertDober commented 2 years ago

related to #427

RobertDober commented 2 years ago

I believe I have fixed this (works locally), but GHA break for < 1.12. Please upgrade to Elixir 1.12 asap if you want to use Earmark 1.5