This is on elm-format-0.19 0.8.0
module Foo exposing (foo)
{-| An SSCCE
[https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media\_features](https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media_features)
-}
foo : Int
foo =
5
Running elm-format on this "double wraps" the URL from this:
[https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media\_features](https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media_features)
...to this:
[[https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media\_features](https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media_features)](https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media_features)
The outputted file looks like this:
module Foo exposing (foo)
{-| An SSCCE
[[https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media\_features](https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media_features)](https://developer.mozilla.org/en-US/docs/Web/CSS/@media#Media_features)
-}
foo : Int
foo =
5
Running it again doubles that...and so forth.
duplicate of https://github.com/avh4/elm-format/issues/535
(and thanks for the detailed report!)
A possible workaround might be to replace _ in the url with %5F, though I'm not familiar enough with the URL/HTTP spec to know if that's actually valid to do, but the thing triggering this bug is the underscore in the URL, which is incorrectly being markdown escaped due to some recent code that fixes a different bug.