markio icon indicating copy to clipboard operation
markio copied to clipboard

Equal urls are removed when parsing

Open abotalov opened this issue 12 years ago • 2 comments

Here is a test HTML file:

<!DOCTYPE NETSCAPE-Bookmark-file-1>
<DL>
  <p>
    <DT><A HREF="http://www.google.com/">Google</A>
    <DT><A HREF="http://www.google.com/">Google</A>
  </p>
</DL>

and test ruby code:

bookmarks = Markio.parse(File.open(filename))
urls = []
bookmarks.each do |b|
  urls << b.href
end
urls.length # outputs 1 though it should be 2

Markio removes duplicated urls in consolidate method of Parser but I believe it shouldn't do so.

If you open this file in browser, you'll see that there are two links there, not one.

abotalov avatar Jul 30 '13 17:07 abotalov

Why do you believe it shouldn't do so? It is of no benefit to have two exactly equal bookmarks (href and title).

bbotelho3 avatar Mar 18 '14 19:03 bbotelho3

AFAIK if there are several equal links in the bookmark file browsers show all of them. Markio should behave the same as browser.

abotalov avatar Mar 18 '14 19:03 abotalov