Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equal urls are removed when parsing #3

Open
abotalov opened this issue Jul 30, 2013 · 2 comments
Open

Equal urls are removed when parsing #3

abotalov opened this issue Jul 30, 2013 · 2 comments

Comments

@abotalov
Copy link
Contributor

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.

@bbotelho3
Copy link

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

@abotalov
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants