tag_along 0.8.1 → 0.8.2

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: f6554ac780ba4ebc485ab4fa3b7e63f3196db51e
4
- data.tar.gz: d5b8e4347aa54b436197a002337db690fa30dc37
3
+ metadata.gz: 024c6761d9dbc0d8eb30f0f849433d49c509d0d8
4
+ data.tar.gz: d80b89970a862b15b423d41fff2f44571210b7cc
5
5
  SHA512:
6
- metadata.gz: 62fa842f8dd0fee7419ff83e3c898ef9fa609f446dc28f5605a4707510b59c5b5f385c17eef4ae2937d7d6d614facc4fade459f05b7674e1704492d6dfdd622e
7
- data.tar.gz: c2ee2182df637be4773dfa438f5e8fb8675dbcdcaf2c3a37fae00da81ccee500e143130bc168805ce1e3147598116934589913ab00bb009ca236d8e1a1a0cb21
6
+ metadata.gz: f62c46f2ade7315365843ed2e57e7f9536dfafb46428c8ad2333b34c0eb793c5f5a5d6d16847b3524fb08669b2e57cdbbe301b0ba33b2bb6d3aefdbaa8898512
7
+ data.tar.gz: 0ed551ed7a29e157399aaad8d48fb345c06acea3e4e7f43a7969bf84f5c67244f90043988481bdc0c3cc8f38d1d69d11f15c5ebce9df65c8883351721be2f609
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 0.8.2 -- bug fix where script would break on empty offset lists
2
+
1
3
  0.8.1 -- fixing tests
2
4
 
3
5
  0.8.0 -- getting plain text from html/xml and readjusting offsets
data/README.md CHANGED
@@ -74,7 +74,7 @@ recreates correct offsets from offsets of the plain text.
74
74
  </html>
75
75
  "
76
76
  tt = TagAlong::TaggedText.new(html_text)
77
- text = hc.plain_text
77
+ text = tt.plain_text
78
78
  # returns "There's Sunday and there's Monday" with lots of space junk
79
79
  text_offsets = [[8, 13], [27, 32]]
80
80
  html_offsets = hc.adjust_offsets(text_offsets)
@@ -49,7 +49,7 @@ class TagAlong
49
49
  def process_offset(plain_text_offsets, offset, adjusted_offsets)
50
50
  o = plain_text_offsets[0]
51
51
 
52
- return if o.offset_start > offset[:text_start]
52
+ return if !o || o.offset_start > offset[:text_start]
53
53
  unless o.adj_start
54
54
  delta = o.offset_start - offset[:text_start]
55
55
  o.adj_start = offset[:start] + delta
@@ -1,3 +1,3 @@
1
1
  class TagAlong
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tag_along
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Mozzherin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-08 00:00:00.000000000 Z
11
+ date: 2013-10-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  Tags a text with arbitrary tags