lib/bookmarks/document.rb in bookmarks-0.2.1 vs lib/bookmarks/document.rb in bookmarks-0.2.2
- old
+ new
@@ -77,11 +77,11 @@
#
# Returns nothing.
# TODO This should have its own parser class.
def parse_a_bookmark line
line = line.strip
- if line =~ /^<DT><H3>/
+ if line =~ /^<DT><H3/
@h3_tags << h3_tags(line)
elsif line =~ /^<\/DL>/
@h3_tags.pop
elsif line =~ /<DT><A HREF="http/
@bookmarks << NetscapeBookmark.from_string(line)
@@ -98,10 +98,10 @@
#
# line - String.
#
# Returns String h3 content or empty string.
def h3_tags line
- md = /<H3>(.*?)<\/H3>/.match(line)
+ md = /<H3.*?>(.*?)<\/H3>/.match(line)
md ? md[1] : ""
end
# First part of a bookmark's file in netscape format.