ubbparser 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/ubbparser.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjY4OWNlMGE3MGI0OGYwMzJjZmZjNWJlYmEzMTVhYWNhNTE2ZDFhMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGJlNzZjY2VmNGQzMmE2MGIzZDA4NGU3YzMyZDU2MDFhYTFhMGM1NQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWZkMmYxZjM1ZWMxNzRkZDUzMDYwMTEzODAyYzU3YWNmYjI5MmVlNzMzZjA0
|
10
|
+
MWRmMzJmYjEwYzE3ODBkOWYwMTcwZjJlMGE5MGRiMzMzZGM1Yzg4YTZkOTc0
|
11
|
+
ZmFiYjQ3NGZmOTljMWVmMGVlMWFkZGY3OGFlODAwMTVlNWNjNDA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWE5NzZiODAxM2QxYTY4Mjc3ZGQwNmZmYzNkNTE3ZjkzMWM3Y2VlYzEwMGUz
|
14
|
+
N2UyMmE2ZWIzMzk2NTIxMTA2YmIyOGI3MTcxNmE4MDc0YjdiMGI5MjhmNGY3
|
15
|
+
OTAzYjkzMTJiY2IzYzY5MTU3OTU0MGNiYTNlMGMyN2JiYzc3MDk=
|
data/lib/ubbparser.rb
CHANGED
@@ -30,7 +30,8 @@ module UBBParser
|
|
30
30
|
extend self
|
31
31
|
|
32
32
|
def inline_elements
|
33
|
-
%w(
|
33
|
+
%w(a abbr address area audio b cite code del details dfn command datalist em font i iframe img input ins kbd
|
34
|
+
label legend link mark meter nav optgroup option q small select source span strong sub summary sup tbody td time var)
|
34
35
|
end
|
35
36
|
|
36
37
|
# Mapping can be used to allow simplified use of files
|
@@ -114,7 +115,8 @@ module UBBParser
|
|
114
115
|
end
|
115
116
|
method_result = send(method_name, inner_text, attributes, parse_options).to_s
|
116
117
|
result << method_result
|
117
|
-
last_html_tag = method_result.match('
|
118
|
+
last_html_tag = method_result.match('</(\w+)>$').to_s.gsub(/[^\w]/, '')
|
119
|
+
STDOUT << "Result of #{code} ends with html tag #{last_html_tag}\n"
|
118
120
|
scnr.skip(/\n?/) unless (inline_elements.include?(last_html_tag)) # Skip next newline if last tag was not inline element
|
119
121
|
end
|
120
122
|
end
|