temple 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 817a4564ae590c547798aa08afb03e970c7a1be0
4
- data.tar.gz: 2d7de8792d73a9d207488a04f93f2cf52adbfdb7
3
+ metadata.gz: 8f6f31642317254d92c0a4d5da0b1c4bdae68ba1
4
+ data.tar.gz: 1a85a078db6b17eef39d085a7065663a8d0f178e
5
5
  SHA512:
6
- metadata.gz: e96b8d1ff3cc0dd3b09c108ef167440bc5cb1229b7b66810e5ecec85c55de1ddf51c3a3548f960e2ebe51ed0dc93a1746dca8146cb44a700264287d1ea7c5535
7
- data.tar.gz: 721be6c7597a773ac7ede0f9f7dba71dc61695c3a52805dc1580dc1aca9615698a621eaefc726311083ebd16afaff38ec9ebd856dd599ae78f4c71196486c4af
6
+ metadata.gz: 4206dc4b58672d35c58bc979d115aa7a34ec411115e9997e55be8a042c37245f2db835aa8ea5b99990964158af1728d4636aab24e3098b4fd7cd58d63554d5d2
7
+ data.tar.gz: ccd399bd6cf7d05503afe1c5d1b028b31265cb2151c6d57f668c0788a2b7ded56bd0dc98a949f0884703e3df507e2573735a407de3c6acd149c961570fe06022
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ 0.7.5
2
+
3
+ * HTML::Pretty Fix indentation issue (https://github.com/slim-template/slim-rails/issues/78)
4
+
1
5
  0.7.4
2
6
 
3
7
  * EngineDSL: allow to replace/remove with regexp
@@ -5,10 +5,10 @@ module Temple
5
5
  define_options indent: ' ',
6
6
  pretty: true,
7
7
  indent_tags: %w(article aside audio base body datalist dd div dl dt
8
- fieldset figure footer form head h1 h2 h3 h4 h5 h6
9
- header hgroup hr html li link meta nav ol option p
10
- rp rt ruby section script style table tbody td tfoot
11
- th thead tr ul video doctype).freeze,
8
+ fieldset figure footer form head h1 h2 h3 h4 h5 h6
9
+ header hgroup hr html li link meta nav ol option p
10
+ rp rt ruby section script style table tbody td tfoot
11
+ th thead tr ul video doctype).freeze,
12
12
  pre_tags: %w(code pre textarea).freeze
13
13
 
14
14
  def initialize(opts = {})
data/lib/temple/utils.rb CHANGED
@@ -79,7 +79,7 @@ module Temple
79
79
  return text if pre_tags && text =~ pre_tags
80
80
 
81
81
  level = text.scan(/^\s*/).map(&:size).min
82
- text = text.gsub(/^\s{#{level}}/, '') if level > 0
82
+ text = text.gsub(/(?!\A)^\s{#{level}}/, '') if level > 0
83
83
 
84
84
  text = text.sub(/\A\s*\n?/, "\n") if indent_next
85
85
  text = text.gsub("\n", indent)
@@ -1,3 +1,3 @@
1
1
  module Temple
2
- VERSION = '0.7.4'
2
+ VERSION = '0.7.5'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: temple
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Magnus Holm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-22 00:00:00.000000000 Z
12
+ date: 2015-01-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tilt
@@ -176,26 +176,5 @@ rubygems_version: 2.2.2
176
176
  signing_key:
177
177
  specification_version: 4
178
178
  summary: Template compilation framework in Ruby
179
- test_files:
180
- - test/filters/test_code_merger.rb
181
- - test/filters/test_control_flow.rb
182
- - test/filters/test_dynamic_inliner.rb
183
- - test/filters/test_eraser.rb
184
- - test/filters/test_escapable.rb
185
- - test/filters/test_multi_flattener.rb
186
- - test/filters/test_static_merger.rb
187
- - test/helper.rb
188
- - test/html/test_attribute_merger.rb
189
- - test/html/test_attribute_remover.rb
190
- - test/html/test_attribute_sorter.rb
191
- - test/html/test_fast.rb
192
- - test/html/test_pretty.rb
193
- - test/mixins/test_dispatcher.rb
194
- - test/mixins/test_grammar_dsl.rb
195
- - test/test_engine.rb
196
- - test/test_erb.rb
197
- - test/test_filter.rb
198
- - test/test_generator.rb
199
- - test/test_grammar.rb
200
- - test/test_map.rb
201
- - test/test_utils.rb
179
+ test_files: []
180
+ has_rdoc: