Running the new Elixir formatter

Maybe not always a huge win for readability.

Before:

@document Meeseeks.Parser.parse(
  {"html", [], [
     {"head", [], []},
      {"body", [], [
          {"div", [], [
              {"p", [], ["1"]},
              {"p", [], ["2"]},
              {"div", [], [
                  {"p", [], ["3"]},
                  {"p", [], ["4"]}]},
              {"p", [], ["5"]}]}]}]})

After:

@document Meeseeks.Parser.parse({
            "html",
            [],
            [
              {"head", [], []},
              {
                "body",
                [],
                [
                  {
                    "div",
                    [],
                    [
                      {"p", [], ["1"]},
                      {"p", [], ["2"]},
                      {"div", [], [{"p", [], ["3"]}, {"p", [], ["4"]}]},
                      {"p", [], ["5"]}
                    ]
                  }
                ]
              }
            ]
          })

Edit: Just want to clarify I’m not trying to be negative about the formatter- I love it! I think it will help the community greatly. A big thank you to those people involved in working on it.

1 Like