All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning. This change log is based upon keep-a-changelog.
3.0.3 - 2022-11-07
- Support sass-embedded #196 Thanks to @ntkme
3.0.2 - 2022-10-13
Hamlit::Engine
andHamlit::Template
use StringBuffer instead of ArrayBuffer- It seems more performant in many cases with recent Ruby versions.
Hamlit::RailsTemplate
is not affected.
3.0.1 - 2022-08-18
- coffee-script is removed from development dependency
- It's not runtime dependency, so it shouldn't impact your application
:coffee
filter still works if you explicitly install coffee-script, however, it's no longer maintained and possibly removed in the future.
3.0.0 - 2022-08-07
- [breaking] Use
disable_capture: false
for non-Rails environments:disable_capture
is an option introduced in v2.16.1. See its release notes for details.- If you use Rails, it continues to use
disable_capture: true
, so you're not impacted by this change.
2.16.2 - 2022-08-07
- Fix an issue when
disable_capture: false
is set and a Ruby comment is put afterdo
2.16.1 - 2022-08-07
- Introduce
:disable_capture
option to capture a block- Default:
disable_capture: true
(backward-compatible)- For Rails, this must be
true
anyway to use Rails-native capturing.
- For Rails, this must be
- If you override the option like
disable_capture: false
in Hamlit::Template, scripts starting with=
(e.g.= render do
) capture a block content.- Scripts starting with
-
(e.g.- users.each do
) are not impacted.
- Scripts starting with
- Default:
2.16.0 - 2022-02-03
- Raise an exception on a Haml-level syntax error with
hamlit compile -c
#189 Thanks to @dlwr
2.15.2 - 2022-01-04
- Consider
playsinline
a boolean attribute #187 Thanks to @ghiculescu
2.15.1 - 2021-07-23
- Remove
benchmark
from the gem package to reduce its size #186 Thanks to @pocke
2.15.0 - 2021-04-12
- Always use Hamlit when both haml.gem and hamlit.gem are installed in Rails Thanks to @igor-drozdov
2.14.6 - 2021-03-23
- Optimize v2.14.5's implementation a little
2.14.5 - 2021-03-23
- Support
config.action_view.annotate_rendered_view_with_filenames = true
of Rails 6.1 Thanks to @kirin121
2.14.4 - 2021-02-01
- Prevent another SEGV in a C extension after
GC.compact
#177 Thanks to @stanhu
2.14.3 - 2021-01-24
- Ensure the Rails initializer is called before
:load_config_initializers
#176 Thanks to @sunny
2.14.2 - 2021-01-21
- Prevent SEGV in a C extension after
GC.compact
#171 Thanks to @stanhu
2.14.1 - 2021-01-07
- Add
-c
option tohamlit compile
that works likehaml -c
#166 Thanks to @knightq
2.14.0 - 2021-01-07
- CLI changes
- Remove
-c
shorthand of--color
. - Make
--color
default. Please use--no-color
to disable it. --color
uses IRB instead of Pry for syntax highlight.- Syntax highlight of
hamlit compile
is enabled only with IRB of Ruby 2.7+. - Syntax highlight of
hamlit parse
/hamlit temple
is enabled only with IRB of Ruby 3.1+.
- Syntax highlight of
- Remove
2.13.2 - 2020-12-27
- Speed up
hamlit
commands #166 Thanks to @knightq
2.13.1 - 2020-12-27
- Support multiline attributes of Haml 5.2.1.
2.13.0 - 2020-10-02
- Support
--enable-frozen-string-literal
#162. Thanks to @aliismayilov
- Upgrade the Haml parser from Haml 4.0 to 5.2 #163.
- Allow
@
as tag's class name. - Fix NameError on an
InvalidAttributeNameError
reference introduced at Hamlit v2.12.0. - You can no longer specify
ugly
option, which has had no effect.
- Allow
2.12.0 - 2020-09-30
- Class names are no longer ordered alphabetically.
Thanks to @aliismayilov
- This is compatible with Haml 5.2
2.11.1 - 2020-08-25
- Fix a line number on an error after filters like preserve, plain, and ruby. Thanks to @rgisiger
2.11.0 - 2019-12-12
- Support Haml's revealed conditional comment feature on
/![if !IE]
#153. Thanks to @esb
2.10.1 - 2019-11-28
- Register
Hamlit::Template
to Tilt as :hamlit as well, in addition to :haml
2.10.0 - 2019-09-15
- Optimize template rendering by string interpolation #146
- Exploiting pre-allocation of string interpolation introduced in Ruby 2.5 ruby/ruby#1626
- Require temple.gem >= 0.8.2
2.9.5 - 2019-09-08
- Supported
:plain
filter in truffleruby
2.9.4 - 2019-09-08
- Experimental support of truffleruby #145.
2.9.3 - 2019-04-09
- Fix deprecation warning on Rails 6 #138. Thanks to @r7kamura
2.9.2 - 2018-11-30
- Fix possible
autoload
failure of dependency #131. Thanks to @wimrijnders
2.9.1 - 2018-11-01
- Start supporting JRuby #100.
2.9.0 - 2018-10-16
- Consider aria attribute as another attribute that supports hyphenation and boolean like data attribute #57. Thanks to @francesco-loreti
2.8.10 - 2018-09-05
- Fix uninitialized constant error introduced in v2.8.9 #125. Thanks to @vovchynniko
2.8.9 - 2018-09-05 [YANKED]
2.8.8 - 2018-04-06
- Don't require Tilt dependencies if unregistered #121. Thanks to @michaelglass
2.8.7 - 2018-02-17
- Fix parser error on string interpolation in attributes
2.8.6 - 2017-12-22
- Fix some unused-variable / method-redefinition warnings
2.8.5 - 2017-11-06
- Fix lexer to work with Ripper of Ruby 2.5
2.8.4 - 2017-06-23
- Allow filename
-
to read input from STDIN forhamlit [parse|temple|compile|render]
#113. Thanks to @gfx
2.8.3 - 2017-06-19
- Add
--color
option tohamlit parse
andhamlit temple
commands too.
2.8.2 - 2017-06-19
- Add
--color
option to opt-in coloring inhamlit compile
command #111.
2.8.1 - 2017-04-03
- Fix SEGV caused by nil in old attributes #101. Thanks to @FND
2.8.0 - 2017-02-12
- Support Temple >= 0.8.0 and change to use StaticAnalyzer in Temple
- Optimize attribute building code a little
2.7.5 - 2016-10-15
- Resurrect
Hamlit::RailsTemplate.set_options
dropped in v2.7.4 unexpectedly.
2.7.4 - 2016-10-15 [YANKED]
- Compile template as xhtml when ActionView regards template as text/xml #92. Thank to @shmargum
2.7.3 - 2016-10-12
- Regard download as an boolean attribute #91. Thank to @pushcx
2.7.2 - 2016-09-19
- Fix engine option warning #90. Thank to @kikonen
2.7.1 - 2016-09-19
- Fix Rails handler to use
ActionView::OutputBuffer
instead ofActionView::SafeBuffer
to justify encoding #89. Thanks to @akelmanson
2.7.0 - 2016-08-31
- Don't escape interpolated content in plain filter #87. Thanks to @shmargum
2.6.2 - 2016-08-27
- Add cdata filter #84. Thanks to @shmargum
- Minimize string allocation on template comipilation using
# frozen_string_literal: true
2.6.1 - 2016-08-18
- For Rails, escape attributes even if it's html_safe
- This is the same fix as Rails for CVE-2016-6316
2.6.0 - 2016-08-14
- Stop using houdini and rewrite HTML escape function to resolve building or packaging problems #82.
- No behavior is changed
2.5.0 - 2016-06-04
- Don't escape the result of
preserve
helper in Rails
2.4.2 - 2016-06-04
- Regard cygwin and bccwin as Windows environment too
2.4.1 - 2016-06-03
- Fix C extension builder to work with Ruby 2.3 on Windows #69. Thanks to @francesco-loreti
2.4.0 - 2016-05-13
- Add
Hamlit::Helpers.preserve
method for Tilt templates
2.3.1 - 2016-05-09
- Specify Ruby version dependency on gemspec #67. Thanks to @grosser
2.3.0 - 2016-04-24
- Add
Hamlit::Filters.remove_filter
method #66. Thanks to @connorshea
:coffeescript
filter's internal class name is changed fromCoffee
toCoffeeScript
2.2.4 - 2017-12-05
- Fix to work with Ruby 2.5. This version is usable with both 2.0 and 2.5.
2.2.3 - 2016-03-10
- Add
hamlit version
subcommand #60. Thanks to @timoschilling
- Fix load path for CLI #61. Thanks to @timoschilling
2.2.2 - 2016-02-21
- Optimize performance of plain filter
- Escape only interpolated text for plain filter #58. Thanks to @shaneog
2.2.1 - 2016-02-06
- Support Windows #54. Thanks to @francesco-loreti
2.2.0 - 2015-12-24
- Optimize inline script inside a tag
- Optimize string interpolation recursively
2.1.2 - 2015-12-16
- Fix rendering failure for static integer #50. Thanks to @yatmsu
2.1.1 - 2015-12-15
- Use faster HTML-escape method for compiling
- Show proper line number for unbalanced brackets error
2.1.0 - 2015-12-14
-I
and-r
options are added tohamlit render
command #37. Thanks to @jhurliman
- Dropped obsolete
escape_utils
gem dependency #48. Thanks to @eagletmt
- Accept NUL character in attribute keys #49. Thanks to @eagletmt
2.0.2 - 2015-12-12
- Fix a crash in compiling with CLI #46. Thanks to @walf443
- Use default engine options properly in CLI commands
2.0.1 - 2015-11-30
- Fix build failure of native extension
2.0.0 - 2015-11-30 [YANKED]
- Support object reference
- Full scratch of internal implementation
- Rendering is strongly optimized
- Static analyzer is introduced
- Built with C extension for runtime rendering
- Optimized compilation for 5 types of attributes
- Compilation became faster too
- Many rendering incompatibilities are resolved
- Rendering is strongly optimized
- [breaking] Replaced parser with original Haml's one
- Incompatible parsing error will never happen, but we can no longer parse attributes with Ripper
- [breaking] Unified behavior for both static and dynamic attributes, see
5 types of attributes
- Though inconsistent behavior is removed, we can no longer rely on completely-Haml-compatible behavior of static attributes and pass haml-spec
- [breaking] Added :escape_attrs option
- You should specify HTML-escaping availability for script and attrs separately.
1.7.2 - 2015-07-22
- Bugfix about parsing a content of tag
- This was introduced in v1.6.6.
1.7.1 - 2015-07-21
- Don't escape a block content of some helpers #35. Thanks to @felixbuenemann
1.7.0 - 2015-07-09
- Support Ruby 2.2.0 hash syntax
- like
{ "hyphened-key": "value" }
- like
1.6.7 - 2015-06-27
- Remove unused variables and avoid shadowing
- To suppress warnings in application using
rspec --warnings
- To suppress warnings in application using
1.6.6 - 2015-06-24
- Allow hyphenated HTML-style attributes pull #29. thanks to @babelfish
1.6.5 - 2015-06-13
- Don't duplicate element class and attribute class
- Raise an error for an empty tag name
1.6.4 - 2015-06-13
- Show human-friendly error messages
- Fix line number of runtime syntax error
- Increase the number of checked cases for illegal nesting. Thanks to @eagletmt
1.6.3 - 2015-06-13
- Fix ! and & parsing inside a tag #27. Thanks to @leesmith
1.6.2 - 2015-06-11
- Reject a content for self-closing tags
- Reject nesing within self-closing tags
1.6.1 - 2015-06-11
- Parse N-space indentation #26. Thanks to @eagletmt
1.6.0 - 2015-06-11
- Fix line number of compiled code for new attributes
- Render HTML entities normally for plain text #27. Thanks to @jeffblake
1.5.9 - 2015-06-08
- Reject silent script after a tag
1.5.8 - 2015-06-08
- Fix parsing inline script for != and &=
1.5.7 - 2015-06-08
- Fix the behavior for multi-line script
1.5.6 - 2015-06-07
- Raise error for unbalanced brackets
- Don't render newline after block script
1.5.5 - 2015-06-07
- Support &, &== operator
- Depend on v0.7.6 of temple for refactoring
- Fix a trivial diff of rendering multiline operator
1.5.4 - 2015-06-07
- Recursively remove whitespace inside a tag
- Fix ! operator immediately before whitespace
1.5.3 - 2015-06-06
- Support !, !=, !==, &= and ~ as inline operators
1.5.2 - 2015-06-06
- Disable html escaping in CSS and JavaScript filter
1.5.1 - 2015-06-05
- Remove outer whitespace in the block
1.5.0 - 2015-06-03
- Remake implementation of outer whitespace removal
1.4.7 - 2015-06-03
- Sort static old attributes by name
- Bugfix for old array attributes with class element
1.4.6 - 2015-06-03
- Support
!==
,==
operator
- Avoid regarding spaced block as multiline
1.4.5 - 2015-06-02
- Support Ruby 2.0 and 2.1 for v1.4.4
1.4.4 - 2015-06-02 [YANKED]
- Fix old attribute parser to be more flexible
- Accept multiple hashes as old attributes
- Accept old attributes with hash and literal
1.4.3 - 2015-06-02
- Allow
when
to have multiple candidates - Allow
rescue
to specify an error variable
1.4.2 - 2015-05-31
- Support
!
operator- It disables html escaping for interpolated text
1.4.1 - 2015-05-31
- Fix code mistake in 1.4.0
1.4.0 - 2015-05-31 [YANKED]
- Escape interpolated string in plain text
1.3.2 - 2015-05-30
- Render
begin
,rescue
andensure
1.3.1 - 2015-05-30
- Bugfix about a backslash-only comment
- Don't strip a plain text
1.3.0 - 2015-05-16
- Resurrect escape_html option
#25.
Thanks to @resistorsoftware
- Still enabled by default
- This has been dropped since v0.6.0
1.2.1 - 2015-05-15
- Fix the list of boolean attributes #24. Thanks to @jeffblake
1.2.0 - 2015-05-06
Added
- Support
succeed
,precede
andsurround
#22. Thanks to @sneakernets
1.1.1 - 2015-05-06
- Bugfix of rendering array attributes
1.1.0 - 2015-05-06
- Join id and class attributes #23. Thanks to @felixbuenemann
1.0.0 - 2015-04-12
- Use escape_utils gem for faster escape_html
0.6.2 - 2015-04-12
- Don't render falsy attributes #2. Thanks to @eagletmt
0.6.1 - 2015-04-12
- Bugfix of line numbers for better error backtrace pull #19
0.6.0 - 2015-04-12
- Automatically escape html in all situations pull #18
0.5.3 - 2015-04-12
- Bugfix for syntax error in data attribute hash #17. Thanks to @eagletmt
0.5.2 - 2015-04-12
- Bugfix for silent script without block #16. Thanks to @eagletmt
0.5.1 - 2015-04-12
- Bugfix about duplicated id and class #4. Thanks to @os0x
0.5.0 - 2015-04-12
- Escape special characters in attribute values #10. Thanks to @mono0x, @eagletmt
0.4.3 - 2015-04-12
- Allow empty else statement #14. Thanks to @jeffblake
- Accept comment-only script #13. Thanks to @jeffblake
0.4.2 - 2015-04-05
- Bugfix about parsing nested attributes #12. Thanks to @creasty
0.4.1 - 2015-04-05
- Automatic escape html is sintara, consult
README.md
.
- Escape haml operators by backslash #11. Thanks to @mono0x
0.4.0 - 2015-04-05 [YANKED]
- Automatically escape html in sinatra
0.3.4 - 2015-04-02
- Allow tab indentation #9. Thanks to @tdtds
0.3.3 - 2015-04-01
- Accept multi byte parsing #8. Thanks to @machu
0.3.2 - 2015-03-31
- Bugfix for compiling old attributes #7. Thanks to @creasty
0.3.1 - 2015-03-31
- Hyphenate data attributes #5. Thanks to @os0x
0.3.0 - 2015-03-31
- Specify a version in dependency of temple
0.2.0 - 2015-03-30
- Allow comments in script #3. Thanks to @eagletmt
0.1.3 - 2015-03-30
- Bugfix for #1 attribute nesting on runtime. Thanks to @eagletmt
0.1.2 - 2015-03-30
- Ignore false or nil values in attributes
- Partial fix for #2. Thanks to @eagletmt
0.1.1 - 2015-03-30
- Drop obsolete
--ugly
option for CLI- Currently pretty mode is not implemented #2
0.1.0 - 2015-03-30
- Initial release
- Passing haml-spec with ugly mode