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

Improper formatting of data structures with keywords #15

Open
xoich opened this issue Jun 5, 2022 · 0 comments
Open

Improper formatting of data structures with keywords #15

xoich opened this issue Jun 5, 2022 · 0 comments

Comments

@xoich
Copy link

xoich commented Jun 5, 2022

Formatting any datastructure will create these alternating indentation when keywords are present:

  [:foo
     1
   :bar
     2]

This is not done in spork/fmt and it creates problems, for example with janet-html:

[:html
     [:head [:title "Title"]]
   [:body
      [:p "paragraph 1"]
    [:p "paragraph 2"]]]

:body and :head, and the two paragraphs should be at the same indentation level.

This is how spork/fmt does it:

[:html
   [:head [:title "Title"]]
   [:body
    [:p "paragraph 1"]
    [:p "paragraph 2"]]]
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

No branches or pull requests

1 participant