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

Highlight text with links in markdown notation #2

Closed
felipebayres opened this issue Aug 28, 2023 · 3 comments
Closed

Highlight text with links in markdown notation #2

felipebayres opened this issue Aug 28, 2023 · 3 comments

Comments

@felipebayres
Copy link

felipebayres commented Aug 28, 2023

I´m trying to highlight a text that containts a markdown link in it.

For example ==Google is [quietly ramping upits AI efforts](https://www.wired.com/story/meet-bard-googles-answer-to-chatgpt/) in response to==

But what really renders is just the string itself:
image

is this plugin expected to work with links as well?

@talatkuyuk
Copy link

talatkuyuk commented Aug 31, 2023

Thank you for reporting the issue. I will take care.

@talatkuyuk
Copy link

talatkuyuk commented Dec 26, 2023

Hi @felipebayres,

remark-flexible-markers traces over the text nodes, and looks for == signs.

Main problem is: The markdown link at the example breaks up the connection between the leading and trailing signs (==)

==Google is [here](https://www.google.com) and always available==

Above markdown phrase consists 3 nodes of text:
1st text --> ==Google is
2nd text (the link has a text as well) --> here
3rd text --> and always available==

As you see none of the text nodes does not satisfy the marker format, ==text==

In order to make connection between the leading and trailing signs (==), due to the fact that there is a link that breaks up the connection between them, it requires too much effort for the implementation. I need community support for that.

But for now, you can try to put == signs at both sides of each text phrase like this:

==Google is ==[==here==](https://www.google.com)== and always available==

In addition, you can set some css style for mark elements inside an anchor in order to provide smooth marker view.

@talatkuyuk
Copy link

talatkuyuk commented Mar 10, 2024

Fixed with version 1.2.0. See https://github.com/ipikuka/remark-flexible-markers/releases/tag/v1.2.0

Now you can highlight the links as requested by @felipebayres like below,

==Google is [AI efforts](https://www.wired.com/story/meet-bard-googles-answer-to-chatgpt/) to==

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