Skip to content

Fix: target correct link when multiple matches are present #50

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

Merged
merged 5 commits into from
Apr 21, 2022

Conversation

imjohnbo
Copy link
Contributor

👋 Hello, this PR should fix #45 by:

  1. (src) Getting all elements from HTML clipboard.
  2. (src) Finding the first occurrence of the matching text in the plaintext clipboard after a search index.
  3. (src) If this is a link, linkify it as before and increment the search index.
  4. (src) If it is not a link, simply increment the search index.

NOTE: I'm capping elements at 100,000, which seems reasonable, performant, and avoids accidental infinite loops.

Let me know what you think! See connected GitHub issue for more 👀.

@imjohnbo imjohnbo requested a review from a team as a code owner April 20, 2022 20:47
@imjohnbo imjohnbo requested a review from jfuchs April 20, 2022 20:47
Copy link
Contributor

@keithamus keithamus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good. Just some minor comments.

@srt32 srt32 merged commit 287767d into github:main Apr 21, 2022
@imjohnbo imjohnbo deleted the treewalker branch April 21, 2022 15:38
@jclem
Copy link

jclem commented Apr 25, 2022

Nice fix, thanks @imjohnbo!

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

Successfully merging this pull request may close these issues.

Pasting HTML with links can place link in the wrong place
4 participants