Skip to content

Latest commit

 

History

History
137 lines (93 loc) · 3.87 KB

CHANGELOG.md

File metadata and controls

137 lines (93 loc) · 3.87 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.12.0 - 2024-05-07

  • Support Ruby 3.3 by handling yield in ERB specifically
  • Use SyntaxTree own class for ParseError to get better error feedback
  • Adds handling for keeping track of column index, to support better error messages

0.11.0 - 2024-04-23

  • ErbContent now has its value as child_nodes instead of empty array.
  • Allow html void tags and format self-closing tags

0.10.5 - 2023-09-03

  • Handle ERB-tags inside HTML-tags, like <div <%= "class='foo'" %>>
  • Handles indentation for multiline ERB-comment
  • Handles spaces between do-arguments and ERB-tags

0.10.4 - 2023-08-28

  • Avoid grouping single tags
  • Handle multiline ERB-comments

0.10.3 - 2023-08-27

Fixes

  • Allows parsing ERB-tags with if, else and end in the same tag
<%= if true
  what
end %>

This opens the possibility for formatting all if-statements with SyntaxTree properly and removes the fix where any if-statement was force to one line.

0.10.2 - 2023-08-22

Fixes

  • Handles formatting empty documents and removing leading new-linews in files with content.
  • Removes trailing whitespace from char data if it is the last element in a document, block or group.

0.10.1 - 2023-08-20

Added

  • Allow DOCTYPE to be after other tags, to work with e.g. ERB-tags on first line.

0.10.0 - 2023-08-20

  • Changes how whitespace and newlines are handled.
  • Supports syntax like:
<%= part %> / <%= total %> (<%= percentage %>%)

0.9.5 - 2023-07-02

  • Fixes ruby comment in ERB-tag included VoidStatement Example:
<% # this is a comment %>

Output:

-<%
-
-  # this is a comment
-%>
+<% # this is a comment %>
  • Updates versions in Bundler

0.9.4 - 2023-07-01

  • Inline even more empty HTML-tags
<three-word-component
  :attribute1
  :attribute2
  :attribute3="value"
->
-</three-word-component>
+></three-word-component>

0.9.3 - 2023-06-30

  • Print empty html-tags on one line if possible

0.9.2 - 2023-06-30

  • Handle whitespace in HTML-strings using ERB-tags

0.9.1 - 2023-06-28

  • Handle formatting of multi-line ERB-tags with more than one statement.

0.9.0 - 2023-06-22

Added

  • 🎉 First version based on syntax_tree-xml 🎉.
  • Can format a lot of .html.erb-syntax and works as a plugin to syntax_tree.
  • This is still early and there are a lot of different weird syntaxes out there.