Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "mdgriffith/elm-codegen",
"summary": "A code generation library for Elm",
"license": "BSD-3-Clause",
"version": "4.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, you should never bump the package version in a PR, unless you're the author

"version": "4.2.2",
"exposed-modules": [
"Elm",
"Elm.Op",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elm-codegen",
"version": "0.5.3",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Samewise

"version": "0.5.4",
"description": "Codegen for Elm",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
19 changes: 17 additions & 2 deletions src/Internal/Write.elm
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,23 @@ prettyExposing exposing_ =

prettyTopLevelExposes : List TopLevelExpose -> Doc t
prettyTopLevelExposes exposes =
List.map prettyTopLevelExpose exposes
|> Pretty.join (Pretty.string ", ")
let
renderedTopLevelExposes =
List.map prettyTopLevelExpose exposes

renderedWithSeparator =
case List.reverse renderedTopLevelExposes of
head :: tail ->
head
:: List.map (Pretty.a <| Pretty.char ',') tail
|> List.reverse

_ ->
renderedTopLevelExposes
Comment on lines +361 to +369
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed or would softlines just work on the result of Pretty.join?

in
renderedWithSeparator
|> Pretty.softlines
|> Pretty.nest 4


prettyTopLevelExpose : TopLevelExpose -> Doc t
Expand Down