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

🐞🔨 Journal: Entry supports overlapping Keywords #1715

Merged
merged 3 commits into from
Jul 28, 2023

Conversation

zspencer
Copy link
Member

Turns out, it was a renderer-layer thing; where the shorter Keyword was getting linkfied prior to the longer Keyword, and when I switched to linkify the longer Keyword first it would double-down on the links putting a link to the shorter keyword within the longer one!

So now I'm matching the # as part of the Keyword, and replacing it with the html entity for #, (aka #)

This makes it so when we linkify keywords long-to-short; the longer keywords no longer contain the shorter keyword; eliminating the nested a tags.

- #1714

Turns out, it was a renderer-layer thing; where the shorter `Keyword`
was getting linkfied prior to the longer `Keyword`, and when I switched
to linkify the longer `Keyword` first it would double-down on the links
putting a link to the shorter keyword within the longer one!

So now I'm matching the `#` as part of the `Keyword`, and replacing it
with the html entity for `#`, (aka `#`)

This makes it so when we linkify keywords long-to-short; the longer
keywords no longer contain the shorter keyword; eliminating the nested
`a` tags.
@zspencer zspencer changed the title 🐞🔨 Journal: Entry body supports multiple overlapping Keywords 🐞🔨 Journal: Entry supports overlapping Keywords Jul 27, 2023
@zspencer zspencer requested review from a team July 27, 2023 21:28
zspencer added 2 commits July 27, 2023 14:54
I noticed I had dropped the `reverse` in the `keywords_regex` method,
and thought... "hmm, that may not be a great thing..."

So I went to write some test cases that would force the reverse to be
put back in; which meant I needed a keyword with aliases...
@zspencer zspencer force-pushed the journal/long-keywords-dont-get-ignored-when-linkifying branch from bda0a88 to 245a2da Compare July 27, 2023 22:09
@zspencer zspencer added 🐞 bug Something isn't working 🔨 Squashed Bugs we think we fixed labels Jul 27, 2023
@zspencer zspencer merged commit 96738d1 into main Jul 28, 2023
@zspencer zspencer deleted the journal/long-keywords-dont-get-ignored-when-linkifying branch July 28, 2023 19:54
@zspencer
Copy link
Member Author

I want my bug fixxxeeeeed so I am merging without review. YOLO!

Still curious about any questions that come-up from review by @zinc-collective/convene-contributors!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🔨 Squashed Bugs we think we fixed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant