hamlit 2.9.3

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