Skip to content

templatetags: Render links as XHTML links #628

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nifey
Copy link

@nifey nifey commented Apr 14, 2025

Convert links in the commit message and comments, to be rendered as clickable XHTML links for easy navigation.

Currently only http, https, ftp and git are recognized. And only links that are not broken across lines are recognized.

I have used a very simple regex to match links: It matches anything after http:// or https:// or ftp:// or git://, till it reaches a space character or '<' character (to prevent it sometimes matching a tag at the end of the link). Let me know if we would need a more exhaustive regex pattern.

Closes: #591

Screenshot 2025-04-14 at 12-24-27 net-next v2 02_14 device property Add optional nargs_prop for get_reference_args - Patchwork

Convert links in the commit message and comments, to be rendered as
clickable XHTML links for easy navigation.

Currently only http, https, ftp and git are recognized. And only links
that are not broken across lines are recognized.

Signed-off-by: Abdun Nihaal <[email protected]>
Closes: getpatchwork#591
@nifey
Copy link
Author

nifey commented Apr 14, 2025

Just realized that the regex is also matching the ) at the end of the config line for the download links (in the screenshot). I changed that and force pushed here.

Now the links are correctly recognized:

Screenshot 2025-04-14 at 13-24-24 net-next v2 02_14 device property Add optional nargs_prop for get_reference_args - Patchwork

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.

Display http/https/ftp/git links as xhtml links
1 participant