Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve generated syntax #11

Closed
wants to merge 2 commits into from
Closed

Improve generated syntax #11

wants to merge 2 commits into from

Conversation

agu-z
Copy link
Contributor

@agu-z agu-z commented Sep 10, 2022

I tried to generate elm icon modules out of the entire FontAwesome 6 distribution and found a couple of syntactic errors in the generated output. This PR addresses all of them:

  • When generating a function for a file name that starts with a number, prefix the name with n to generate a valid Elm identifier.
  • Handle comments between SVG nodes.
  • elm-format compliant (addresses Generated code is not valid according to elm-format #9):
    • No redundant parenthesis
    • Function expression in an indented new line
    • Surround non-empty list elements with spaces
    • Surround comments with spaces and trim content
    • Two empty lines between declarations
    • End file with a newline

@agu-z agu-z closed this by deleting the head repository Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant