hlt 0.6.1 → 0.6.2
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/hlt.rb +12 -5
- metadata +8 -8
- metadata.gz.sig +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8a56a470b40740138cbbbc5e5cc6be96edd052f
|
4
|
+
data.tar.gz: 6d3a53d17ff4d38482dd9762989587312e9c52d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d9da6de1544708247a5aa062f384c6e0b389f789fb5c804ae591094b6b2b51afe452b721495eb4b8ebe2a476446b50a3f84e5f75475d1c4be63e4364bce2fce
|
7
|
+
data.tar.gz: 59b1d73d13a3e1c45f32fc8258e0f7f63b50268a7d3610840c02324fe01fe41cea945311120f9228cb7e6e216579ccd401cbed893d822f0c9cc18db371024a86
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/hlt.rb
CHANGED
@@ -14,20 +14,24 @@ class Hlt
|
|
14
14
|
def initialize(raw_s, pretty: true, declaration: true, style: true,
|
15
15
|
debug: false)
|
16
16
|
|
17
|
-
|
17
|
+
|
18
|
+
@debug = debug
|
18
19
|
# strip out lines which are blank or only contain a comment
|
19
20
|
#s = raw_s.lines.to_a.reject!{|x| x[/(^\s+\#\s)|(^\s*$)/] }
|
20
21
|
|
21
22
|
raw_s.strip!
|
22
23
|
|
23
24
|
s2, martile = fetch_martile raw_s
|
25
|
+
puts 'martile: ' + martile.inspect if @debug
|
24
26
|
s, xml_list = filter_xml(s2)
|
25
27
|
|
26
28
|
#s = raw_s
|
27
29
|
# strip out the text from the line containing a comment
|
28
30
|
s.gsub!(/((^#\s|\s#\s).*)/,'').strip if s[/((^#\s|\s#\s).*)/]
|
29
|
-
|
30
|
-
s.
|
31
|
+
puts 's: ' + s.inspect if @debug
|
32
|
+
a_code = s.scan(/^\[([^\]]+)\]\B/).map(&:first)
|
33
|
+
puts 'a_code: ' + a_code.inspect if @debug
|
34
|
+
s.gsub!(/\n\[[^\]]+\]\B/, " !CODE\n")
|
31
35
|
|
32
36
|
s2 = s.lines.to_a.map!{|line|
|
33
37
|
|
@@ -66,7 +70,10 @@ class Hlt
|
|
66
70
|
s3 = s2.join.gsub(/^(\s*)-\s+/,'\1templatecode ').\
|
67
71
|
gsub(/^(\s*)=\s+/,'\1templateoutput ')
|
68
72
|
|
69
|
-
|
73
|
+
puts 's3: ' + s3.inspect if @debug
|
74
|
+
|
75
|
+
raw_html = LineTree.new(*s3, ignore_non_element: false, debug: debug).to_xml
|
76
|
+
puts 'raw_html: ' + raw_html.inspect if @debug
|
70
77
|
|
71
78
|
html = raw_html.gsub('!CODE').with_index do |x,i|
|
72
79
|
"\n\n" + a_code[i].lines.map{|x| ' ' * 4 + x}.join + "\n"
|
@@ -233,7 +240,7 @@ class Hlt
|
|
233
240
|
end
|
234
241
|
end
|
235
242
|
|
236
|
-
puts 'line: ' + line.inspect
|
243
|
+
puts 'line: ' + line.inspect if @debug
|
237
244
|
line
|
238
245
|
|
239
246
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hlt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
sRlrGDTopksgnOiLC2QX128tctCCXvdHQlcLPOIqakOkwdqA+fWvzX/vBL+R3LDJ
|
31
31
|
dgw=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-03-16 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: line-tree
|
@@ -41,7 +41,7 @@ dependencies:
|
|
41
41
|
version: '0.6'
|
42
42
|
- - ">="
|
43
43
|
- !ruby/object:Gem::Version
|
44
|
-
version: 0.6.
|
44
|
+
version: 0.6.7
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
47
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -51,27 +51,27 @@ dependencies:
|
|
51
51
|
version: '0.6'
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.6.
|
54
|
+
version: 0.6.7
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: martile
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0.
|
61
|
+
version: '0.9'
|
62
62
|
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 0.
|
64
|
+
version: 0.9.0
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: '0.
|
71
|
+
version: '0.9'
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0.
|
74
|
+
version: 0.9.0
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rexle-builder
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
���Ù�����;!c�ѦiV������q�M
|
1
|
+
~�3�u�ҠOg ЅƓf�:���Wھ�T��/y��t �Hޮ)���h���3�d[<��U����ծ:�#]��=qUwnI�|U�Z��Lw��F�_�T4y�`�E��Xi
|