temple 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +4 -0
- data/lib/temple/html/pretty.rb +4 -4
- data/lib/temple/utils.rb +1 -1
- data/lib/temple/version.rb +1 -1
- metadata +4 -25
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8f6f31642317254d92c0a4d5da0b1c4bdae68ba1
|
|
4
|
+
data.tar.gz: 1a85a078db6b17eef39d085a7065663a8d0f178e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4206dc4b58672d35c58bc979d115aa7a34ec411115e9997e55be8a042c37245f2db835aa8ea5b99990964158af1728d4636aab24e3098b4fd7cd58d63554d5d2
|
|
7
|
+
data.tar.gz: ccd399bd6cf7d05503afe1c5d1b028b31265cb2151c6d57f668c0788a2b7ded56bd0dc98a949f0884703e3df507e2573735a407de3c6acd149c961570fe06022
|
data/CHANGES
CHANGED
data/lib/temple/html/pretty.rb
CHANGED
|
@@ -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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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(
|
|
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)
|
data/lib/temple/version.rb
CHANGED
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
|
+
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:
|
|
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
|
-
|
|
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:
|