wp2txt 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/wp2txt/utils.rb CHANGED
@@ -47,8 +47,8 @@ module Wp2txt
47
47
 
48
48
  def process_nested_structure(scanner, left, right, &block)
49
49
  buffer = ""
50
+ begin
50
51
  while str = scanner.scan_until(/(#{Regexp.escape(left)}|#{Regexp.escape(right)})/m)
51
- # begin
52
52
  case scanner[1]
53
53
  when left
54
54
  buffer << str
@@ -72,6 +72,9 @@ module Wp2txt
72
72
  scanner.string = buffer
73
73
  return process_nested_structure(scanner, left, right, &block) || ""
74
74
  end
75
+ rescue => e
76
+ return scanner.string
77
+ end
75
78
  end
76
79
 
77
80
  def remove_templates(str, only_not_inline = true)
@@ -1,3 +1,3 @@
1
1
  module Wp2txt
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wp2txt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: