~sircmpwn/sr.ht-dev

lists.sr.ht: Make Gemini and IRC links clickable v1 PROPOSED

~ancarda: 1
 Make Gemini and IRC links clickable

 1 files changed, 1 insertions(+), 1 deletions(-)
#788082 alpine.yml success
#788083 archlinux.yml success
#788084 debian.yml success
> -    body = urlize(msg.body, rel="noopener nofollow")
> +    body = urlize(msg.body, rel="noopener nofollow", extra_schemes=["gemini", "irc", "ircs"])
Should this be in sync with core.sr.ht?
https://git.sr.ht/~sircmpwn/core.sr.ht/tree/744c3cf6/item/srht/markdown.py#L187-198
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/33298/mbox | git am -3
Learn more about email & git

[PATCH lists.sr.ht] Make Gemini and IRC links clickable Export this patch

From: Mark Dain <mark@markdain.net>

---
Unfortunately I don't have a local instance of SourceHut to test with,
so this is based on the Jinja2 documentation. Apologies if this doesn't
work.

You can test using this page:
https://lists.sr.ht/~ancarda/testing/%3CCI1XY54NPPK0.15K71NUYOOPCD%40Marks-
MacBook-Pro.local%3E

 listssrht/filters.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/listssrht/filters.py b/listssrht/filters.py
index e60149f..e9d4d75 100644
--- a/listssrht/filters.py
+++ b/listssrht/filters.py
@@ -127,7 +127,7 @@ def format_body(msg, limit=None):
        return _format_patch(msg, limit)
    text = Markup("")
    line_no = 0
    body = urlize(msg.body, rel="noopener nofollow")
    body = urlize(msg.body, rel="noopener nofollow", extra_schemes=["gemini", "irc", "ircs"])
    for line in msg.body.replace("\r", "").split("\n"):
        line_no += 1
        if line_no == limit:
-- 
2.34.2
lists.sr.ht/patches: SUCCESS in 4m48s

[Make Gemini and IRC links clickable][0] from [~ancarda][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/33298
[1]: mailto:mark@markdain.net

✓ #788083 SUCCESS lists.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/788083
✓ #788082 SUCCESS lists.sr.ht/patches/alpine.yml    https://builds.sr.ht/~sircmpwn/job/788082
✓ #788084 SUCCESS lists.sr.ht/patches/debian.yml    https://builds.sr.ht/~sircmpwn/job/788084
Un-tested patches are not welcome. You should set up a local environment
to verify your work in.