hamlit 2.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +17 -0
  3. data/.travis.yml +47 -0
  4. data/CHANGELOG.md +702 -0
  5. data/Gemfile +30 -0
  6. data/LICENSE.txt +44 -0
  7. data/README.md +150 -0
  8. data/REFERENCE.md +272 -0
  9. data/Rakefile +117 -0
  10. data/benchmark/boolean_attribute.haml +6 -0
  11. data/benchmark/class_attribute.haml +5 -0
  12. data/benchmark/common_attribute.haml +3 -0
  13. data/benchmark/data_attribute.haml +4 -0
  14. data/benchmark/dynamic_attributes/boolean_attribute.haml +4 -0
  15. data/benchmark/dynamic_attributes/class_attribute.haml +4 -0
  16. data/benchmark/dynamic_attributes/common_attribute.haml +2 -0
  17. data/benchmark/dynamic_attributes/data_attribute.haml +2 -0
  18. data/benchmark/dynamic_attributes/id_attribute.haml +2 -0
  19. data/benchmark/dynamic_boolean_attribute.haml +4 -0
  20. data/benchmark/dynamic_merger/benchmark.rb +25 -0
  21. data/benchmark/dynamic_merger/hello.haml +50 -0
  22. data/benchmark/dynamic_merger/hello.string +50 -0
  23. data/benchmark/etc/attribute_builder.haml +5 -0
  24. data/benchmark/etc/real_sample.haml +888 -0
  25. data/benchmark/etc/real_sample.rb +11 -0
  26. data/benchmark/etc/static_analyzer.haml +1 -0
  27. data/benchmark/etc/string_interpolation.haml +2 -0
  28. data/benchmark/etc/tags.haml +3 -0
  29. data/benchmark/etc/tags_loop.haml +2 -0
  30. data/benchmark/ext/build_data.rb +17 -0
  31. data/benchmark/ext/build_id.rb +13 -0
  32. data/benchmark/id_attribute.haml +3 -0
  33. data/benchmark/plain.haml +4 -0
  34. data/benchmark/script.haml +4 -0
  35. data/benchmark/slim/LICENSE +21 -0
  36. data/benchmark/slim/context.rb +11 -0
  37. data/benchmark/slim/run-benchmarks.rb +94 -0
  38. data/benchmark/slim/view.erb +23 -0
  39. data/benchmark/slim/view.haml +18 -0
  40. data/benchmark/slim/view.slim +17 -0
  41. data/benchmark/utils/benchmark_ips_extension.rb +43 -0
  42. data/bin/bench +77 -0
  43. data/bin/console +11 -0
  44. data/bin/ruby +3 -0
  45. data/bin/setup +7 -0
  46. data/bin/stackprof +27 -0
  47. data/bin/test +24 -0
  48. data/exe/hamlit +6 -0
  49. data/ext/hamlit/extconf.rb +10 -0
  50. data/ext/hamlit/hamlit.c +555 -0
  51. data/ext/hamlit/hescape.c +108 -0
  52. data/ext/hamlit/hescape.h +20 -0
  53. data/hamlit.gemspec +47 -0
  54. data/lib/hamlit.rb +11 -0
  55. data/lib/hamlit/attribute_builder.rb +175 -0
  56. data/lib/hamlit/attribute_compiler.rb +125 -0
  57. data/lib/hamlit/attribute_parser.rb +110 -0
  58. data/lib/hamlit/cli.rb +130 -0
  59. data/lib/hamlit/compiler.rb +97 -0
  60. data/lib/hamlit/compiler/children_compiler.rb +112 -0
  61. data/lib/hamlit/compiler/comment_compiler.rb +36 -0
  62. data/lib/hamlit/compiler/doctype_compiler.rb +46 -0
  63. data/lib/hamlit/compiler/script_compiler.rb +106 -0
  64. data/lib/hamlit/compiler/silent_script_compiler.rb +24 -0
  65. data/lib/hamlit/compiler/tag_compiler.rb +76 -0
  66. data/lib/hamlit/dynamic_merger.rb +67 -0
  67. data/lib/hamlit/engine.rb +38 -0
  68. data/lib/hamlit/error.rb +15 -0
  69. data/lib/hamlit/escapable.rb +13 -0
  70. data/lib/hamlit/filters.rb +75 -0
  71. data/lib/hamlit/filters/base.rb +12 -0
  72. data/lib/hamlit/filters/cdata.rb +20 -0
  73. data/lib/hamlit/filters/coffee.rb +17 -0
  74. data/lib/hamlit/filters/css.rb +33 -0
  75. data/lib/hamlit/filters/erb.rb +10 -0
  76. data/lib/hamlit/filters/escaped.rb +22 -0
  77. data/lib/hamlit/filters/javascript.rb +33 -0
  78. data/lib/hamlit/filters/less.rb +20 -0
  79. data/lib/hamlit/filters/markdown.rb +10 -0
  80. data/lib/hamlit/filters/plain.rb +29 -0
  81. data/lib/hamlit/filters/preserve.rb +22 -0
  82. data/lib/hamlit/filters/ruby.rb +10 -0
  83. data/lib/hamlit/filters/sass.rb +15 -0
  84. data/lib/hamlit/filters/scss.rb +15 -0
  85. data/lib/hamlit/filters/text_base.rb +25 -0
  86. data/lib/hamlit/filters/tilt_base.rb +49 -0
  87. data/lib/hamlit/force_escapable.rb +29 -0
  88. data/lib/hamlit/helpers.rb +15 -0
  89. data/lib/hamlit/html.rb +14 -0
  90. data/lib/hamlit/identity.rb +13 -0
  91. data/lib/hamlit/object_ref.rb +30 -0
  92. data/lib/hamlit/parser.rb +49 -0
  93. data/lib/hamlit/parser/MIT-LICENSE +20 -0
  94. data/lib/hamlit/parser/README.md +30 -0
  95. data/lib/hamlit/parser/haml_buffer.rb +348 -0
  96. data/lib/hamlit/parser/haml_compiler.rb +553 -0
  97. data/lib/hamlit/parser/haml_error.rb +61 -0
  98. data/lib/hamlit/parser/haml_helpers.rb +727 -0
  99. data/lib/hamlit/parser/haml_options.rb +286 -0
  100. data/lib/hamlit/parser/haml_parser.rb +800 -0
  101. data/lib/hamlit/parser/haml_util.rb +288 -0
  102. data/lib/hamlit/parser/haml_xss_mods.rb +109 -0
  103. data/lib/hamlit/rails_helpers.rb +51 -0
  104. data/lib/hamlit/rails_template.rb +59 -0
  105. data/lib/hamlit/railtie.rb +10 -0
  106. data/lib/hamlit/ruby_expression.rb +32 -0
  107. data/lib/hamlit/string_splitter.rb +19 -0
  108. data/lib/hamlit/template.rb +28 -0
  109. data/lib/hamlit/utils.rb +20 -0
  110. data/lib/hamlit/version.rb +4 -0
  111. metadata +392 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 430b8a37db72797f5e809b12d83872c4d224fa61fea3c761b0f8862118b000c6
4
+ data.tar.gz: e7a8a2766ae263f8081c2209df44813bf16f69d07edaf02c5dd2826dd6345b46
5
+ SHA512:
6
+ metadata.gz: aa28798199b8c7981fa690420f5a045e8e1619f459e48fead5e85b100697f7a0bbb2dae0dc016c5e847c6a0e41fc10fdcdfc06de6950dfbdc3f5d3dabaf9eb51
7
+ data.tar.gz: b98674075aa2922d8bd76cb765a7f0d4df9f3b323387ddb2bb16c9eddbfa7db89ca1256b72c548c191b947669b530224c52cf743a81972677ed7f6fd123ca995
@@ -0,0 +1,17 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ .sass-cache
11
+ .ruby-version
12
+ *.bundle
13
+ *.so
14
+ *.su
15
+ *.o
16
+ *.a
17
+ *.swp
@@ -0,0 +1,47 @@
1
+ language: ruby
2
+ cache: bundler
3
+ branches:
4
+ only:
5
+ - master
6
+ script:
7
+ - "RUBYOPT='-w' bundle exec rake $TASK"
8
+ matrix:
9
+ include:
10
+ - rvm: 2.3.8
11
+ env: TASK=test
12
+ - rvm: 2.4.5
13
+ env: TASK=test
14
+ - rvm: 2.5.3
15
+ env: TASK=test
16
+ - rvm: 2.6.0
17
+ env: TASK=test
18
+ - rvm: ruby-head
19
+ env: TASK=test
20
+ - rvm: jruby-9.2.8.0
21
+ env: TASK=test
22
+ - rvm: truffleruby
23
+ env: TASK=test
24
+ - rvm: 2.6.0
25
+ env: TASK=bench TEMPLATE=benchmark/boolean_attribute.haml,benchmark/class_attribute.haml,benchmark/id_attribute.haml,benchmark/data_attribute.haml,benchmark/common_attribute.haml
26
+ - rvm: 2.6.0
27
+ env: TASK=bench TEMPLATE=benchmark/dynamic_attributes/boolean_attribute.haml,benchmark/dynamic_attributes/class_attribute.haml,benchmark/dynamic_attributes/id_attribute.haml,benchmark/dynamic_attributes/data_attribute.haml,benchmark/dynamic_attributes/common_attribute.haml
28
+ - rvm: 2.6.0
29
+ env: TASK=bench SLIM_BENCH=1
30
+ - rvm: 2.6.0
31
+ env: TASK=bench TEMPLATE=benchmark/etc/attribute_builder.haml
32
+ - rvm: 2.6.0
33
+ env: TASK=bench TEMPLATE=benchmark/etc/static_analyzer.haml
34
+ - rvm: 2.6.0
35
+ env: TASK=bench TEMPLATE=benchmark/etc/string_interpolation.haml
36
+ - rvm: 2.6.0
37
+ env: TASK=bench TEMPLATE=test/haml/templates/standard.haml COMPILE=1
38
+ allow_failures:
39
+ - rvm: ruby-head
40
+ env: TASK=test
41
+ - env: TASK=bench TEMPLATE=benchmark/boolean_attribute.haml,benchmark/class_attribute.haml,benchmark/id_attribute.haml,benchmark/data_attribute.haml,benchmark/common_attribute.haml
42
+ - env: TASK=bench TEMPLATE=benchmark/dynamic_attributes/boolean_attribute.haml,benchmark/dynamic_attributes/class_attribute.haml,benchmark/dynamic_attributes/id_attribute.haml,benchmark/dynamic_attributes/data_attribute.haml,benchmark/dynamic_attributes/common_attribute.haml
43
+ - env: TASK=bench SLIM_BENCH=1
44
+ - env: TASK=bench TEMPLATE=benchmark/etc/attribute_builder.haml
45
+ - env: TASK=bench TEMPLATE=benchmark/etc/static_analyzer.haml
46
+ - env: TASK=bench TEMPLATE=benchmark/etc/string_interpolation.haml
47
+ - env: TASK=bench TEMPLATE=test/haml/templates/standard.haml COMPILE=1
@@ -0,0 +1,702 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file. This
4
+ project adheres to [Semantic Versioning](http://semver.org/). This change log is based upon
5
+ [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog).
6
+
7
+ ## [2.10.0](https://github.com/k0kubun/hamlit/compare/v2.9.5...v2.10.0) - 2019-09-15
8
+
9
+ ### Added
10
+
11
+ - Optimize template rendering by exploiting string interpolation [#146](https://github.com/k0kubun/hamlit/issues/146)
12
+ - Exploiting pre-allocation of string interpolation introduced in Ruby 2.5 [ruby/ruby#1626](https://github.com/ruby/ruby/pull/1626)
13
+ - Require temple.gem >= 0.8.2
14
+
15
+ ## [2.9.5](https://github.com/k0kubun/hamlit/compare/v2.9.4...v2.9.5) - 2019-09-08
16
+
17
+ ### Added
18
+
19
+ - Supported `:plain` filter in truffleruby
20
+
21
+ ## [2.9.4](https://github.com/k0kubun/hamlit/compare/v2.9.3...v2.9.4) - 2019-09-08
22
+
23
+ ### Added
24
+
25
+ - Experimental support of truffleruby [#145](https://github.com/k0kubun/hamlit/issues/145).
26
+
27
+ ## [2.9.3](https://github.com/k0kubun/hamlit/compare/v2.9.2...v2.9.3) - 2019-04-09
28
+
29
+ ### Fixed
30
+
31
+ - Fix deprecation warning on Rails 6 [#138](https://github.com/k0kubun/hamlit/issues/138).
32
+ *Thanks to @r7kamura*
33
+
34
+ ## [2.9.2](https://github.com/k0kubun/hamlit/compare/v2.9.1...v2.9.2) - 2018-11-30
35
+
36
+ ### Fixed
37
+
38
+ - Fix possible `autoload` failure of dependency [#131](https://github.com/k0kubun/hamlit/issues/131).
39
+ *Thanks to @wimrijnders*
40
+
41
+ ## [2.9.1](https://github.com/k0kubun/hamlit/compare/v2.9.0...v2.9.1) - 2018-11-01
42
+
43
+ ### Added
44
+
45
+ - Start supporting JRuby [#100](https://github.com/k0kubun/hamlit/issues/100).
46
+
47
+ ## [2.9.0](https://github.com/k0kubun/hamlit/compare/v2.8.10...v2.9.0) - 2018-10-16
48
+
49
+ ### Added
50
+
51
+ - Consider aria attribute as another attribute that supports hyphenation and boolean like data attribute
52
+ [#57](https://github.com/k0kubun/hamlit/pull/57). *Thanks to @francesco-loreti*
53
+
54
+ ## [2.8.10](https://github.com/k0kubun/hamlit/compare/v2.8.9...v2.8.10) - 2018-09-05
55
+
56
+ ### Fixed
57
+
58
+ - Fix uninitialized constant error introduced in v2.8.9
59
+ [#125](https://github.com/k0kubun/hamlit/pull/125). *Thanks to @vovchynniko*
60
+
61
+ ## [2.8.9](https://github.com/k0kubun/hamlit/compare/v2.8.8...v2.8.9) - 2018-09-05 [YANKED]
62
+
63
+ ### Fixed
64
+
65
+ - Don't raise an error on UTF-8 BOM [#117](https://github.com/k0kubun/hamlit/pull/117)
66
+ [#124](https://github.com/k0kubun/hamlit/pull/124). *Thanks to @southwolf*
67
+
68
+ ## [2.8.8](https://github.com/k0kubun/hamlit/compare/v2.8.7...v2.8.8) - 2018-04-06
69
+
70
+ ### Fixed
71
+
72
+ - Don't require Tilt dependencies if unregistered
73
+ [#121](https://github.com/k0kubun/hamlit/pull/121). *Thanks to @michaelglass*
74
+
75
+ ## [2.8.7](https://github.com/k0kubun/hamlit/compare/v2.8.6...v2.8.7) - 2018-02-17
76
+
77
+ ### Fixed
78
+
79
+ - Fix parser error on string interpolation in attributes
80
+
81
+ ## [2.8.6](https://github.com/k0kubun/hamlit/compare/v2.8.5...v2.8.6) - 2017-12-22
82
+
83
+ ### Fixed
84
+
85
+ - Fix some unused-variable / method-redefinition warnings
86
+
87
+ ## [2.8.5](https://github.com/k0kubun/hamlit/compare/v2.8.4...v2.8.5) - 2017-11-06
88
+
89
+ ### Fixed
90
+
91
+ - Fix lexer to work with Ripper of Ruby 2.5
92
+
93
+ ## [2.8.4](https://github.com/k0kubun/hamlit/compare/v2.8.3...v2.8.4) - 2017-06-23
94
+
95
+ ### Added
96
+
97
+ - Allow filename `-` to read input from STDIN for `hamlit [parse|temple|compile|render]`
98
+ [#113](https://github.com/k0kubun/hamlit/issues/113). *Thanks to @gfx*
99
+
100
+ ## [2.8.3](https://github.com/k0kubun/hamlit/compare/v2.8.2...v2.8.3) - 2017-06-19
101
+
102
+ ### Added
103
+
104
+ - Add `--color` option to `hamlit parse` and `hamlit temple` commands too.
105
+
106
+ ## [2.8.2](https://github.com/k0kubun/hamlit/compare/v2.8.1...v2.8.2) - 2017-06-19
107
+
108
+ ### Added
109
+
110
+ - Add `--color` option to opt-in coloring in `hamlit compile` command
111
+ [#111](https://github.com/k0kubun/hamlit/issues/111).
112
+
113
+ ## [2.8.1](https://github.com/k0kubun/hamlit/compare/v2.8.0...v2.8.1) - 2017-04-03
114
+
115
+ ### Fixed
116
+
117
+ - Fix SEGV caused by nil in old attributes
118
+ [#101](https://github.com/k0kubun/hamlit/issues/101). *Thanks to @FND*
119
+
120
+ ## [2.8.0](https://github.com/k0kubun/hamlit/compare/v2.7.5...v2.8.0) - 2017-02-12
121
+
122
+ ### Changed
123
+
124
+ - Support Temple >= 0.8.0 and change to use StaticAnalyzer in Temple
125
+ - Optimize attribute building code a little
126
+
127
+ ## [2.7.5](https://github.com/k0kubun/hamlit/compare/v2.7.4...v2.7.5) - 2016-10-15
128
+
129
+ ### Fixed
130
+
131
+ - Resurrect `Hamlit::RailsTemplate.set_options` dropped in v2.7.4 unexpectedly.
132
+
133
+ ## [2.7.4](https://github.com/k0kubun/hamlit/compare/v2.7.3...v2.7.4) - 2016-10-15 [YANKED]
134
+
135
+ ### Fixed
136
+
137
+ - Compile template as xhtml when ActionView regards template as text/xml
138
+ [#92](https://github.com/k0kubun/hamlit/issues/92). *Thank to @shmargum*
139
+
140
+ ## [2.7.3](https://github.com/k0kubun/hamlit/compare/v2.7.2...v2.7.3) - 2016-10-12
141
+
142
+ ### Fixed
143
+
144
+ - Regard download as an boolean attribute
145
+ [#91](https://github.com/k0kubun/hamlit/pull/91). *Thank to @pushcx*
146
+
147
+ ## [2.7.2](https://github.com/k0kubun/hamlit/compare/v2.7.1...v2.7.2) - 2016-09-19
148
+
149
+ ### Fixed
150
+
151
+ - Fix engine option warning
152
+ [#90](https://github.com/k0kubun/hamlit/issues/90). *Thank to @kikonen*
153
+
154
+ ## [2.7.1](https://github.com/k0kubun/hamlit/compare/v2.7.0...v2.7.1) - 2016-09-19
155
+
156
+ ### Fixed
157
+
158
+ - Fix Rails handler to use `ActionView::OutputBuffer` instead of `ActionView::SafeBuffer` to justify encoding
159
+ [#89](https://github.com/k0kubun/hamlit/pull/89). *Thanks to @akelmanson*
160
+
161
+ ## [2.7.0](https://github.com/k0kubun/hamlit/compare/v2.6.2...v2.7.0) - 2016-08-31
162
+
163
+ ### Changed
164
+
165
+ - Don't escape interpolated content in plain filter
166
+ [#87](https://github.com/k0kubun/hamlit/pull/87). *Thanks to @shmargum*
167
+
168
+ ## [2.6.2](https://github.com/k0kubun/hamlit/compare/v2.6.1...v2.6.2) - 2016-08-27
169
+
170
+ ### Added
171
+
172
+ - Add cdata filter
173
+ [#84](https://github.com/k0kubun/hamlit/issues/84). *Thanks to @shmargum*
174
+ - Minimize string allocation on template comipilation using `# frozen_string_literal: true`
175
+
176
+ ## [2.6.1](https://github.com/k0kubun/hamlit/compare/v2.6.0...v2.6.1) - 2016-08-18
177
+
178
+ ### Fixed
179
+
180
+ - For Rails, escape attributes even if it's html\_safe
181
+ - This is the same fix as Rails for [CVE-2016-6316](https://groups.google.com/forum/#!topic/ruby-security-ann/8B2iV2tPRSE)
182
+
183
+ ## [2.6.0](https://github.com/k0kubun/hamlit/compare/v2.5.0...v2.6.0) - 2016-08-14
184
+
185
+ ### Changed
186
+
187
+ - Stop using [houdini](https://github.com/vmg/houdini) and rewrite HTML escape function to resolve building or packaging problems [#82](https://github.com/k0kubun/hamlit/pull/82).
188
+ - No behavior is changed
189
+
190
+ ## [2.5.0](https://github.com/k0kubun/hamlit/compare/v2.4.2...v2.5.0) - 2016-06-04
191
+
192
+ ### Changed
193
+
194
+ - Don't escape the result of `preserve` helper in Rails
195
+
196
+ ## [2.4.2](https://github.com/k0kubun/hamlit/compare/v2.4.1...v2.4.2) - 2016-06-04
197
+
198
+ ### Fixed
199
+
200
+ - Regard cygwin and bccwin as Windows environment too
201
+
202
+ ## [2.4.1](https://github.com/k0kubun/hamlit/compare/v2.4.0...v2.4.1) - 2016-06-03
203
+
204
+ ### Fixed
205
+
206
+ - Fix C extension builder to work with Ruby 2.3 on Windows
207
+ [#69](https://github.com/k0kubun/hamlit/issues/69). *Thanks to @francesco-loreti*
208
+
209
+ ## [2.4.0](https://github.com/k0kubun/hamlit/compare/v2.3.1...v2.4.0) - 2016-05-13
210
+
211
+ ### Added
212
+
213
+ - Add `Hamlit::Helpers.preserve` method for Tilt templates
214
+
215
+ ## [2.3.1](https://github.com/k0kubun/hamlit/compare/v2.3.0...v2.3.1) - 2016-05-09
216
+
217
+ ### Fixed
218
+
219
+ - Specify Ruby version dependency on gemspec
220
+ [#67](https://github.com/k0kubun/hamlit/issues/67). *Thanks to @grosser*
221
+
222
+ ## [2.3.0](https://github.com/k0kubun/hamlit/compare/v2.2.3...v2.3.0) - 2016-04-24
223
+
224
+ ### Added
225
+
226
+ - Add `Hamlit::Filters.remove_filter` method
227
+ [#66](https://github.com/k0kubun/hamlit/issues/66). *Thanks to @connorshea*
228
+
229
+ ### Changed
230
+
231
+ - `:coffeescript` filter's internal class name is changed from `Coffee` to `CoffeeScript`
232
+
233
+ ## [2.2.4](https://github.com/k0kubun/hamlit/compare/v2.2.3...v2.2.4) - 2017-12-05
234
+
235
+ ### Fixed
236
+
237
+ - Fix to work with Ruby 2.5. This version is usable with both 2.0 and 2.5.
238
+
239
+ ## [2.2.3](https://github.com/k0kubun/hamlit/compare/v2.2.2...v2.2.3) - 2016-03-10
240
+
241
+ ### Added
242
+
243
+ - Add `hamlit version` subcommand
244
+ [#60](https://github.com/k0kubun/hamlit/pull/60). *Thanks to @timoschilling*
245
+
246
+ ### Fixed
247
+
248
+ - Fix load path for CLI
249
+ [#61](https://github.com/k0kubun/hamlit/pull/61). *Thanks to @timoschilling*
250
+
251
+ ## [2.2.2](https://github.com/k0kubun/hamlit/compare/v2.2.1...v2.2.2) - 2016-02-21
252
+
253
+ ### Added
254
+
255
+ - Optimize performance of plain filter
256
+
257
+ ### Fixed
258
+
259
+ - Escape only interpolated text for plain filter
260
+ [#58](https://github.com/k0kubun/hamlit/issues/58). *Thanks to @shaneog*
261
+
262
+ ## [2.2.1](https://github.com/k0kubun/hamlit/compare/v2.2.0...v2.2.1) - 2016-02-06
263
+
264
+ ### Added
265
+
266
+ - Support Windows
267
+ [#54](https://github.com/k0kubun/hamlit/issues/54). *Thanks to @francesco-loreti*
268
+
269
+ ## [2.2.0](https://github.com/k0kubun/hamlit/compare/v2.1.2...v2.2.0) - 2015-12-24
270
+
271
+ ### Added
272
+
273
+ - Optimize inline script inside a tag
274
+ - Optimize string interpolation recursively
275
+
276
+ ## [2.1.2](https://github.com/k0kubun/hamlit/compare/v2.1.1...v2.1.2) - 2015-12-16
277
+
278
+ ### Fixed
279
+
280
+ - Fix rendering failure for static integer
281
+ [#50](https://github.com/k0kubun/hamlit/pull/50). *Thanks to @yatmsu*
282
+
283
+ ## [2.1.1](https://github.com/k0kubun/hamlit/compare/v2.1.0...v2.1.1) - 2015-12-15
284
+
285
+ ### Fixed
286
+
287
+ - Use faster HTML-escape method for compiling
288
+ - Show proper line number for unbalanced brackets error
289
+
290
+ ## [2.1.0](https://github.com/k0kubun/hamlit/compare/v2.0.2...v2.1.0) - 2015-12-14
291
+
292
+ ### Added
293
+
294
+ - `-I` and `-r` options are added to `hamlit render` command
295
+ [#37](https://github.com/k0kubun/hamlit/issues/37). *Thanks to @jhurliman*
296
+
297
+ ### Changed
298
+
299
+ - Dropped obsolete `escape_utils` gem dependency
300
+ [#48](https://github.com/k0kubun/hamlit/pull/48). *Thanks to @eagletmt*
301
+
302
+ ### Fixed
303
+
304
+ - Accept NUL character in attribute keys
305
+ [#49](https://github.com/k0kubun/hamlit/pull/49). *Thanks to @eagletmt*
306
+
307
+ ## [2.0.2](https://github.com/k0kubun/hamlit/compare/v2.0.1...v2.0.2) - 2015-12-12
308
+
309
+ ### Fixed
310
+ - Fix a crash in compiling with CLI
311
+ [#46](https://github.com/k0kubun/hamlit/pull/46). *Thanks to @walf443*
312
+ - Use default engine options properly in CLI commands
313
+
314
+ ## [2.0.1](https://github.com/k0kubun/hamlit/compare/v2.0.0...v2.0.1) - 2015-11-30
315
+
316
+ ### Fixed
317
+ - Fix build failure of native extension
318
+
319
+ ## [2.0.0](https://github.com/k0kubun/hamlit/compare/v1.7.2...v2.0.0) - 2015-11-30 [YANKED]
320
+ ### Added
321
+ - Support object reference
322
+
323
+ ### Changed
324
+ - Full scratch of internal implementation
325
+ - Rendering is strongly optimized
326
+ - Static analyzer is introduced
327
+ - Built with C extension for runtime rendering
328
+ - Optimized compilation for 5 types of attributes
329
+ - Compilation became faster too
330
+ - Many rendering incompatibilities are resolved
331
+ - [**breaking**] Replaced parser with original Haml's one
332
+ - Incompatible parsing error will never happen, but we can no longer parse
333
+ attributes with Ripper
334
+ - [**breaking**] Unified behavior for both static and dynamic attributes, see
335
+ [5 types of attributes](REFERENCE.md#5-types-of-attributes)
336
+ - Though inconsistent behavior is removed, we can no longer rely on
337
+ completely-Haml-compatible behavior of static attributes and pass haml-spec
338
+ - [**breaking**] Added :escape\_attrs option
339
+ - You should specify HTML-escaping availability for script and attrs
340
+ separately.
341
+
342
+ ## [1.7.2](https://github.com/k0kubun/hamlit/compare/v1.7.1...v1.7.2) - 2015-07-22
343
+
344
+ ### Fixed
345
+ - Bugfix about parsing a content of tag
346
+ - This was introduced in v1.6.6.
347
+
348
+ ## [1.7.1](https://github.com/k0kubun/hamlit/compare/v1.7.0...v1.7.1) - 2015-07-21
349
+
350
+ ### Fixed
351
+ - Don't escape a block content of some helpers
352
+ [#35](https://github.com/k0kubun/hamlit/issues/35). *Thanks to @felixbuenemann*
353
+
354
+ ## [1.7.0](https://github.com/k0kubun/hamlit/compare/v1.6.7...v1.7.0) - 2015-07-09
355
+
356
+ ### Added
357
+ - Support Ruby 2.2.0 hash syntax
358
+ - like `{ "hyphened-key": "value" }`
359
+
360
+ ## [1.6.7](https://github.com/k0kubun/hamlit/compare/v1.6.6...v1.6.7) - 2015-06-27
361
+
362
+ ### Fixed
363
+ - Remove unused variables and avoid shadowing
364
+ - To suppress warnings in application using `rspec --warnings`
365
+
366
+ ## [1.6.6](https://github.com/k0kubun/hamlit/compare/v1.6.5...v1.6.6) - 2015-06-24
367
+
368
+ ### Added
369
+ - Allow hyphenated HTML-style attributes
370
+ [pull #29](https://github.com/k0kubun/hamlit/pull/29). *thanks to @babelfish*
371
+
372
+ ## [1.6.5](https://github.com/k0kubun/hamlit/compare/v1.6.4...v1.6.5) - 2015-06-13
373
+
374
+ ### Fixed
375
+ - Don't duplicate element class and attribute class
376
+ - Raise an error for an empty tag name
377
+
378
+ ## [1.6.4](https://github.com/k0kubun/hamlit/compare/v1.6.3...v1.6.4) - 2015-06-13
379
+
380
+ ### Changed
381
+ - Show human-friendly error messages
382
+
383
+ ### Fixed
384
+ - Fix line number of runtime syntax error
385
+ - Increase the number of checked cases for illegal nesting.
386
+ *Thanks to @eagletmt*
387
+
388
+ ## [1.6.3](https://github.com/k0kubun/hamlit/compare/v1.6.2...v1.6.3) - 2015-06-13
389
+
390
+ ### Fixed
391
+ - Fix ! and & parsing inside a tag
392
+ [#27](https://github.com/k0kubun/hamlit/issues/27#issuecomment-111593458).
393
+ *Thanks to @leesmith*
394
+
395
+ ## [1.6.2](https://github.com/k0kubun/hamlit/compare/v1.6.1...v1.6.2) - 2015-06-11
396
+
397
+ ### Fixed
398
+ - Reject a content for self-closing tags
399
+ - Reject nesing within self-closing tags
400
+
401
+ ## [1.6.1](https://github.com/k0kubun/hamlit/compare/v1.6.0...v1.6.1) - 2015-06-11
402
+
403
+ ### Fixed
404
+ - Parse N-space indentation
405
+ [#26](https://github.com/k0kubun/hamlit/issues/26). *Thanks to @eagletmt*
406
+
407
+ ## [1.6.0](https://github.com/k0kubun/hamlit/compare/v1.5.9...v1.6.0) - 2015-06-11
408
+
409
+ ### Fixed
410
+ - Fix line number of compiled code for new attributes
411
+ - Render HTML entities normally for plain text
412
+ [#27](https://github.com/k0kubun/hamlit/issues/27). *Thanks to @jeffblake*
413
+
414
+ ## [1.5.9](https://github.com/k0kubun/hamlit/compare/v1.5.8...v1.5.9) - 2015-06-08
415
+
416
+ ### Fixed
417
+ - Reject silent script after a tag
418
+
419
+ ## [1.5.8](https://github.com/k0kubun/hamlit/compare/v1.5.7...v1.5.8) - 2015-06-08
420
+
421
+ ### Fixed
422
+ - Fix parsing inline script for != and &=
423
+
424
+ ## [1.5.7](https://github.com/k0kubun/hamlit/compare/v1.5.6...v1.5.7) - 2015-06-08
425
+
426
+ ### Fixed
427
+ - Fix the behavior for multi-line script
428
+
429
+ ## [1.5.6](https://github.com/k0kubun/hamlit/compare/v1.5.5...v1.5.6) - 2015-06-07
430
+
431
+ ### Added
432
+ - Raise error for unbalanced brackets
433
+
434
+ ### Changed
435
+ - Don't render newline after block script
436
+
437
+ ## [1.5.5](https://github.com/k0kubun/hamlit/compare/v1.5.4...v1.5.5) - 2015-06-07
438
+
439
+ ### Added
440
+ - Support &, &== operator
441
+
442
+ ### Changed
443
+ - Depend on v0.7.6 of temple for refactoring
444
+
445
+ ### Fixed
446
+ - Fix a trivial diff of rendering multiline operator
447
+
448
+ ## [1.5.4](https://github.com/k0kubun/hamlit/compare/v1.5.3...v1.5.4) - 2015-06-07
449
+
450
+ ### Changed
451
+ - Recursively remove whitespace inside a tag
452
+
453
+ ### Fixed
454
+ - Fix ! operator immediately before whitespace
455
+
456
+ ## [1.5.3](https://github.com/k0kubun/hamlit/compare/v1.5.2...v1.5.3) - 2015-06-06
457
+
458
+ ### Added
459
+ - Support !, !=, !==, &= and ~ as inline operators
460
+
461
+ ## [1.5.2](https://github.com/k0kubun/hamlit/compare/v1.5.1...v1.5.2) - 2015-06-06
462
+
463
+ ### Changed
464
+ - Disable html escaping in CSS and JavaScript filter
465
+
466
+ ## [1.5.1](https://github.com/k0kubun/hamlit/compare/v1.5.0...v1.5.1) - 2015-06-05
467
+
468
+ ### Changed
469
+ - Remove outer whitespace in the block
470
+
471
+ ## [1.5.0](https://github.com/k0kubun/hamlit/compare/v1.4.7...v1.5.0) - 2015-06-03
472
+
473
+ ### Changed
474
+ - Remake implementation of outer whitespace removal
475
+
476
+ ## [1.4.7](https://github.com/k0kubun/hamlit/compare/v1.4.6...v1.4.7) - 2015-06-03
477
+
478
+ ### Changed
479
+ - Sort static old attributes by name
480
+
481
+ ### Fixed
482
+ - Bugfix for old array attributes with class element
483
+
484
+ ## [1.4.6](https://github.com/k0kubun/hamlit/compare/v1.4.5...v1.4.6) - 2015-06-03
485
+
486
+ ### Added
487
+ - Support `!==`, `==` operator
488
+
489
+ ### Fixed
490
+ - Avoid regarding spaced block as multiline
491
+
492
+ ## [1.4.5](https://github.com/k0kubun/hamlit/compare/v1.4.4...v1.4.5) - 2015-06-02
493
+
494
+ ### Fixed
495
+ - Support Ruby 2.0 and 2.1 for v1.4.4
496
+
497
+ ## [1.4.4](https://github.com/k0kubun/hamlit/compare/v1.4.3...v1.4.4) - 2015-06-02 [YANKED]
498
+
499
+ ### Fixed
500
+ - Fix old attribute parser to be more flexible
501
+ - Accept multiple hashes as old attributes
502
+ - Accept old attributes with hash and literal
503
+
504
+ ## [1.4.3](https://github.com/k0kubun/hamlit/compare/v1.4.2...v1.4.3) - 2015-06-02
505
+
506
+ ### Changed
507
+ - Allow `when` to have multiple candidates
508
+ - Allow `rescue` to specify an error variable
509
+
510
+ ## [1.4.2](https://github.com/k0kubun/hamlit/compare/v1.4.1...v1.4.2) - 2015-05-31
511
+
512
+ ### Added
513
+ - Support `!` operator
514
+ - It disables html escaping for interpolated text
515
+
516
+ ## [1.4.1](https://github.com/k0kubun/hamlit/compare/v1.4.0...v1.4.1) - 2015-05-31
517
+
518
+ ### Fixed
519
+ - Fix code mistake in 1.4.0
520
+
521
+ ## [1.4.0](https://github.com/k0kubun/hamlit/compare/v1.3.2...v1.4.0) - 2015-05-31 [YANKED]
522
+
523
+ ### Added
524
+ - Escape interpolated string in plain text
525
+
526
+ ## [1.3.2](https://github.com/k0kubun/hamlit/compare/v1.3.1...v1.3.2) - 2015-05-30
527
+
528
+ - Render `begin`, `rescue` and `ensure`
529
+
530
+ ## [1.3.1](https://github.com/k0kubun/hamlit/compare/v1.3.0...v1.3.1) - 2015-05-30
531
+
532
+ ### Fixed
533
+ - Bugfix about a backslash-only comment
534
+ - Don't strip a plain text
535
+
536
+ ## [1.3.0](https://github.com/k0kubun/hamlit/compare/v1.2.1...v1.3.0) - 2015-05-16
537
+
538
+ ### Added
539
+ - Resurrect escape\_html option
540
+ [#25](https://github.com/k0kubun/hamlit/issues/25).
541
+ *Thanks to @resistorsoftware*
542
+ - Still enabled by default
543
+ - This has been dropped since v0.6.0
544
+
545
+ ## [1.2.1](https://github.com/k0kubun/hamlit/compare/v1.2.0...v1.2.1) - 2015-05-15
546
+
547
+ ### Fixed
548
+ - Fix the list of boolean attributes
549
+ [#24](https://github.com/k0kubun/hamlit/issues/24). *Thanks to @jeffblake*
550
+
551
+ ## [1.2.0](https://github.com/k0kubun/hamlit/compare/v1.1.1...v1.2.0) - 2015-05-06
552
+
553
+ Added
554
+ - Support `succeed`, `precede` and `surround`
555
+ [#22](https://github.com/k0kubun/hamlit/issues/22). *Thanks to @sneakernets*
556
+
557
+ ## [1.1.1](https://github.com/k0kubun/hamlit/compare/v1.1.0...v1.1.1) - 2015-05-06
558
+
559
+ ### Fixed
560
+ - Bugfix of rendering array attributes
561
+
562
+ ## [1.1.0](https://github.com/k0kubun/hamlit/compare/v1.0.0...v1.1.0) - 2015-05-06
563
+
564
+ ### Fixed
565
+ - Join id and class attributes
566
+ [#23](https://github.com/k0kubun/hamlit/issues/23).
567
+ *Thanks to @felixbuenemann*
568
+
569
+ ## [1.0.0](https://github.com/k0kubun/hamlit/compare/v0.6.2...v1.0.0) - 2015-04-12
570
+
571
+ ### Added
572
+ - Use escape\_utils gem for faster escape\_html
573
+
574
+ ## [0.6.2](https://github.com/k0kubun/hamlit/compare/v0.6.1...v0.6.2) - 2015-04-12
575
+
576
+ ### Fixed
577
+ - Don't render falsy attributes
578
+ [#2](https://github.com/k0kubun/hamlit/issues/2). *Thanks to @eagletmt*
579
+
580
+ ## [0.6.1](https://github.com/k0kubun/hamlit/compare/v0.6.0...v0.6.1) - 2015-04-12
581
+
582
+ ### Fixed
583
+ - Bugfix of line numbers for better error backtrace
584
+ [pull #19](https://github.com/k0kubun/hamlit/pull/19)
585
+
586
+ ## [0.6.0](https://github.com/k0kubun/hamlit/compare/v0.5.3...v0.6.0) - 2015-04-12
587
+
588
+ ### Added
589
+ - Automatically escape html in all situations
590
+ [pull #18](https://github.com/k0kubun/hamlit/pull/18)
591
+
592
+ ## [0.5.3](https://github.com/k0kubun/hamlit/compare/v0.5.2...v0.5.3) - 2015-04-12
593
+
594
+ ### Fixed
595
+ - Bugfix for syntax error in data attribute hash
596
+ [#17](https://github.com/k0kubun/hamlit/issues/17). *Thanks to @eagletmt*
597
+
598
+ ## [0.5.2](https://github.com/k0kubun/hamlit/compare/v0.5.1...v0.5.2) - 2015-04-12
599
+
600
+ ### Fixed
601
+ - Bugfix for silent script without block
602
+ [#16](https://github.com/k0kubun/hamlit/issues/16). *Thanks to @eagletmt*
603
+
604
+ ## [0.5.1](https://github.com/k0kubun/hamlit/compare/v0.5.0...v0.5.1) - 2015-04-12
605
+
606
+ ### Fixed
607
+ - Bugfix about duplicated id and class
608
+ [#4](https://github.com/k0kubun/hamlit/issues/4). *Thanks to @os0x*
609
+
610
+ ## [0.5.0](https://github.com/k0kubun/hamlit/compare/v0.4.3...v0.5.0) - 2015-04-12
611
+
612
+ ### Fixed
613
+ - Escape special characters in attribute values
614
+ [#10](https://github.com/k0kubun/hamlit/issues/10). *Thanks to @mono0x,
615
+ @eagletmt*
616
+
617
+ ## [0.4.3](https://github.com/k0kubun/hamlit/compare/v0.4.2...v0.4.3) - 2015-04-12
618
+
619
+ ### Fixed
620
+ - Allow empty else statement [#14](https://github.com/k0kubun/hamlit/issues/14).
621
+ *Thanks to @jeffblake*
622
+ - Accept comment-only script [#13](https://github.com/k0kubun/hamlit/issues/13).
623
+ *Thanks to @jeffblake*
624
+
625
+ ## [0.4.2](https://github.com/k0kubun/hamlit/compare/v0.4.1...v0.4.2) - 2015-04-05
626
+
627
+ ### Fixed
628
+ - Bugfix about parsing nested attributes
629
+ [#12](https://github.com/k0kubun/hamlit/issues/12). *Thanks to @creasty*
630
+
631
+ ## [0.4.1](https://github.com/k0kubun/hamlit/compare/v0.4.0...v0.4.1) - 2015-04-05
632
+
633
+ ### Removed
634
+ - Automatic escape html is sintara, consult `README.md`.
635
+
636
+ ### Fixed
637
+ - Escape haml operators by backslash
638
+ [#11](https://github.com/k0kubun/hamlit/issues/11). *Thanks to @mono0x*
639
+
640
+ ## [0.4.0](https://github.com/k0kubun/hamlit/compare/v0.3.4...v0.4.0) - 2015-04-05 [YANKED]
641
+
642
+ ### Added
643
+ - Automatically escape html in sinatra
644
+
645
+ ## [0.3.4](https://github.com/k0kubun/hamlit/compare/v0.3.3...v0.3.4) - 2015-04-02
646
+
647
+ ### Fixed
648
+ - Allow tab indentation [#9](https://github.com/k0kubun/hamlit/issues/9).
649
+ *Thanks to @tdtds*
650
+
651
+ ## [0.3.3](https://github.com/k0kubun/hamlit/compare/v0.3.2...v0.3.3) - 2015-04-01
652
+
653
+ ### Fixed
654
+ - Accept multi byte parsing [#8](https://github.com/k0kubun/hamlit/issues/8).
655
+ *Thanks to @machu*
656
+
657
+ ## [0.3.2](https://github.com/k0kubun/hamlit/compare/v0.3.1...v0.3.2) - 2015-03-31
658
+
659
+ ### Fixed
660
+ - Bugfix for compiling old attributes [#7](https://github.com/k0kubun/hamlit/issues/7).
661
+ *Thanks to @creasty*
662
+
663
+ ## [0.3.1](https://github.com/k0kubun/hamlit/compare/v0.3.0...v0.3.1) - 2015-03-31
664
+
665
+ ### Fixed
666
+ - Hyphenate data attributes [#5](https://github.com/k0kubun/hamlit/issues/5).
667
+ *Thanks to @os0x*
668
+
669
+ ## [0.3.0](https://github.com/k0kubun/hamlit/compare/v0.2.0...v0.3.0) - 2015-03-31
670
+
671
+ ### Added
672
+ - Specify a version in dependency of temple
673
+
674
+ ## [0.2.0](https://github.com/k0kubun/hamlit/compare/v0.1.3...v0.2.0) - 2015-03-30
675
+
676
+ ### Added
677
+ - Allow comments in script [#3](https://github.com/k0kubun/hamlit/issues/3).
678
+ *Thanks to @eagletmt*
679
+
680
+ ## [0.1.3](https://github.com/k0kubun/hamlit/compare/v0.1.2...v0.1.3) - 2015-03-30
681
+
682
+ ### Fixed
683
+ - Bugfix for [#1](https://github.com/k0kubun/hamlit/issues/1) attribute nesting
684
+ on runtime. *Thanks to @eagletmt*
685
+
686
+ ## [0.1.2](https://github.com/k0kubun/hamlit/compare/v0.1.1...v0.1.2) - 2015-03-30
687
+
688
+ ### Fixed
689
+ - Ignore false or nil values in attributes
690
+ - Partial fix for [#2](https://github.com/k0kubun/hamlit/issues/2).
691
+ *Thanks to @eagletmt*
692
+
693
+ ## [0.1.1](https://github.com/k0kubun/hamlit/compare/v0.1.0...v0.1.1) - 2015-03-30
694
+
695
+ ### Removed
696
+ - Drop obsolete `--ugly` option for CLI
697
+ - Currently pretty mode is not implemented #2
698
+
699
+ ## [0.1.0](https://github.com/k0kubun/hamlit/compare/9cf8216...v0.1.0) - 2015-03-30
700
+
701
+ - Initial release
702
+ - Passing haml-spec with ugly mode