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 +4 -1
- data/lib/wp2txt/version.rb +1 -1
- metadata +1 -1
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)
|
data/lib/wp2txt/version.rb
CHANGED