Skip to content

Conversation

@julien-nc
Copy link
Member

Override NcRichText link resolving to support markdown links.

This currently produces a lot of warnings because the references prop of <NcRichText> is declared as Object but the implementation actually expects an array. I'll fix that in nc/vue.

@julien-nc julien-nc added enhancement New feature or request 3. to review labels Apr 16, 2025
@julien-nc julien-nc requested review from janepie and kyteinsky April 16, 2025 12:07
Copy link
Member

@janepie janepie left a comment

Choose a reason for hiding this comment

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

Tested, looks good! Testing libraries left and right 🚀

@julien-nc
Copy link
Member Author

Let's wait to merge that, I realized it was not avoiding the closing parenthesis. I think we need 2 regexps, one for plain URLs and one for markdown links. I'll do that later.

@janepie
Copy link
Member

janepie commented Apr 16, 2025

Or we need to strip stuff from the end? Like if the link is part of a sentence in brackets (like this https://test.com) or at the end of a sentence with a dot e.g. https://test.com.

@julien-nc
Copy link
Member Author

The problem is that brackets are allowed in GET params. So why should we strip anything from (like that https://text.com?plop=lala) .
We can make the choice to not support trailing brackets (that should probably be url-encoded anyway. But how do we choose the list of characters that we strip? Most of them will be allowed in GET params. Not sure how to proceed here.

@julien-nc julien-nc force-pushed the enh/noid/render-markdown-link-previews branch from f5a215e to d3c4875 Compare April 16, 2025 16:24
@janepie janepie self-requested a review April 17, 2025 09:20
@julien-nc julien-nc force-pushed the enh/noid/render-markdown-link-previews branch from d3c4875 to 3d8a702 Compare April 23, 2025 14:31
Copy link
Member

@janepie janepie left a comment

Choose a reason for hiding this comment

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

🚀

@julien-nc julien-nc merged commit c201817 into main Apr 23, 2025
9 checks passed
@julien-nc julien-nc deleted the enh/noid/render-markdown-link-previews branch April 23, 2025 14:42
@julien-nc julien-nc mentioned this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants