polyrex-headings 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/polyrex-headings.rb +10 -3
- data.tar.gz.sig +2 -2
- metadata +18 -18
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 557c31bbb8767f09e6ba662efc9b23408ded60bb
|
4
|
+
data.tar.gz: f3a4f1a4303426dc0e899843677a0afe4c85e317
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05112117e37a2b3434248f472913c8df62d1d2f0e3787bce3b900ecf7e02f7dacf0961c37ecf1c5b865898a30da7f31353cae4bf48ad41bb00e3711122662324
|
7
|
+
data.tar.gz: dd9f3dfb5d2beb5f62e05a1b4d01c451b883a745ce90d0164cc536ff9932b1fc7afab322618f8733faee2526f79695bb137e2dbd409b77bef25b36c4269d00b6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/polyrex-headings.rb
CHANGED
@@ -6,10 +6,15 @@ require 'polyrex'
|
|
6
6
|
|
7
7
|
class PolyrexHeadings
|
8
8
|
|
9
|
-
attr_reader :to_polyrex
|
9
|
+
attr_reader :to_polyrex, :to_s
|
10
10
|
|
11
11
|
def initialize(raw_s)
|
12
12
|
|
13
|
+
# add an empty space to the blank line where there is no
|
14
|
+
# raw record between headings
|
15
|
+
|
16
|
+
raw_s.gsub!(/(#+[^\n]+\n+)(?=\n#)/m,'\1 ')
|
17
|
+
|
13
18
|
summary, *s = raw_s.split(/(?=(?:#|[^\n]+\n-+))/,2)
|
14
19
|
|
15
20
|
a = if raw_s =~ /----/ then
|
@@ -39,7 +44,9 @@ class PolyrexHeadings
|
|
39
44
|
|
40
45
|
end
|
41
46
|
summary.sub!(/^(<\?)(ph|polyrex-headings)/,'\1polyrex')
|
42
|
-
@
|
47
|
+
@to_s = string = summary + a.join
|
48
|
+
|
49
|
+
@to_polyrex = Polyrex.new.parse(string)
|
43
50
|
end
|
44
51
|
|
45
52
|
private
|
@@ -48,4 +55,4 @@ class PolyrexHeadings
|
|
48
55
|
' ' * (n)
|
49
56
|
end
|
50
57
|
|
51
|
-
end
|
58
|
+
end
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
s��puQU�U0��5GRJJ�
|
2
|
+
�'�Hg8֊����Hr}������_"!��:axq%:u5Z���+4�[��=�A�
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyrex-headings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -12,26 +12,26 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWAmV1MB4XDTE2MTEyMjE1Mjg0N1oXDTE3MTEyMjE1Mjg0N1owSDESMBAG
|
16
16
|
A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
|
17
17
|
EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
18
|
+
ggEBAN/421XZpe6JsaSP6z9xRXhrsSt33XsiLHio+zL4Huwnxjr4X28aPv5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
-
date:
|
34
|
+
date: 2016-11-22 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: polyrex
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.5.1
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: polyrex-headings
|
metadata.gz.sig
CHANGED
Binary file
|