diff --git a/src/ElmFormat/Render/Box.hs b/src/ElmFormat/Render/Box.hs index e1d59fc45..927a432b5 100644 --- a/src/ElmFormat/Render/Box.hs +++ b/src/ElmFormat/Render/Box.hs @@ -700,7 +700,18 @@ formatModuleDocs elmVersion importInfo blocks = content :: String content = - ElmFormat.Render.Markdown.formatMarkdown (fmap format . parse) blocks + ElmFormat.Render.Markdown.formatMarkdown (fmap format . parse) $ fmap cleanBlock blocks + + cleanBlock :: Markdown.Block -> Markdown.Block + cleanBlock block = + case block of + Markdown.ElmDocs docs -> + Markdown.ElmDocs $ + (fmap . fmap) + (Text.replace (Text.pack "(..)") (Text.pack "")) + docs + _ -> + block in formatDocComment content diff --git a/tests/test-files/transform/DocCommentAtDocs.elm b/tests/test-files/transform/DocCommentAtDocs.elm index e7e61bef5..424405c55 100644 --- a/tests/test-files/transform/DocCommentAtDocs.elm +++ b/tests/test-files/transform/DocCommentAtDocs.elm @@ -1,4 +1,4 @@ -module DocCommentAtDocs exposing (x, y, z) +module DocCommentAtDocs exposing (x, y, z, T(..)) {-| @@ -6,6 +6,7 @@ module DocCommentAtDocs exposing (x, y, z) x, y, z +@docs T(..) @docs a , b , c @docs d diff --git a/tests/test-files/transform/DocCommentAtDocs.formatted.elm b/tests/test-files/transform/DocCommentAtDocs.formatted.elm index dc23cf063..3a8c15471 100644 --- a/tests/test-files/transform/DocCommentAtDocs.formatted.elm +++ b/tests/test-files/transform/DocCommentAtDocs.formatted.elm @@ -2,6 +2,7 @@ module DocCommentAtDocs exposing ( x , y , z + , T(..) ) {-| @@ -9,6 +10,7 @@ module DocCommentAtDocs exposing @docs x @docs y @docs z +@docs T @docs a, b, c @docs d