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.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/lib/hlt.rb +12 -5
  5. metadata +8 -8
  6. metadata.gz.sig +1 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c84fd69fa082a907a0df5c140bd1cc3519dd0c7
4
- data.tar.gz: ab6a2d8d68c17930659bb7326da904ce7c738ff5
3
+ metadata.gz: f8a56a470b40740138cbbbc5e5cc6be96edd052f
4
+ data.tar.gz: 6d3a53d17ff4d38482dd9762989587312e9c52d1
5
5
  SHA512:
6
- metadata.gz: e83dcfb9bfb9fc044fb463c7ccfedfd0b6d61756ac953be3f4a3867c12b7c793ec78e2f482550ec7b0680254a79de7989a8833af4833852e647428eb09ef8230
7
- data.tar.gz: b8b5406e5838d29f87d0f06397328ed190f1c74cbf96aafd7a34ed4858257e3afb7a0be1b19c0bcb1c3de5255bb282e4e0c12ee7d23a8186d60b653e660eb7ec
6
+ metadata.gz: 1d9da6de1544708247a5aa062f384c6e0b389f789fb5c804ae591094b6b2b51afe452b721495eb4b8ebe2a476446b50a3f84e5f75475d1c4be63e4364bce2fce
7
+ data.tar.gz: 59b1d73d13a3e1c45f32fc8258e0f7f63b50268a7d3610840c02324fe01fe41cea945311120f9228cb7e6e216579ccd401cbed893d822f0c9cc18db371024a86
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
- a_code = s.scan(/^\[([^\]]+)\]\n/).map(&:first)
30
- s.gsub!(/\n\[[^\]]+\]\n/, " !CODE\n")
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
- raw_html = LineTree.new(s3, ignore_non_element: false).to_xml
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.1
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-02-10 00:00:00.000000000 Z
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.4
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.4
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.8'
61
+ version: '0.9'
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: 0.8.3
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.8'
71
+ version: '0.9'
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
- version: 0.8.3
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
- �;��UQ��G��O���@�U�� �!�-61���B%?RE����k��/�Lj����7���,�T�$m]�˨��iWςN�-+����(�}a�ۅ�H�����؇���KwU���'Hw�cufMY ��D��xö��}D�x�@.T{���R��RSQI �أӜ CV�n���)[7�_ ��|�m�K%΍v�gN�p?������ڨ��+
2
- ���Ù�����;!c�ѦiV������q�M
1
+ ~�3�u�ҠOg ЅƓf�:���Wھ�T��/y��t �Hޮ)���h 3d[<��U����ծ:�#]��= qUwnI�|UZ��Lw��F_T4 y�`�E��Xi