~sircmpwn/sr.ht-dev

core.sr.ht: Add bare anchor tag for header link v1 PROPOSED

gildarts: 1
 Add bare anchor tag for header link

 1 files changed, 2 insertions(+), 2 deletions(-)
#304926 alpine.yml failed
#304927 archlinux.yml failed
#304928 debian.yml failed
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/13918/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH core.sr.ht] Add bare anchor tag for header link Export this patch

---
 srht/markdown.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srht/markdown.py b/srht/markdown.py
index 22e8b9a..391730e 100644
--- a/srht/markdown.py
+++ b/srht/markdown.py
@@ -12,7 +12,7 @@ import mistletoe as m
from mistletoe.span_token import SpanToken, RawText
import re

SRHT_MARKDOWN_VERSION = 8
SRHT_MARKDOWN_VERSION = 9

class PlainLink(SpanToken):
    """
@@ -114,7 +114,7 @@ class SrhtRenderer(m.HTMLRenderer):
        return template.format(attr=attr, inner=inner)

    def render_heading(self, token):
        template = '<h{level} id="{_id}">{inner}</h{level}>'
        template = '<h{level} id="{_id}"><a href="#{_id}">#</a>{inner}</h{level}>'
        level = token.level + self.baselevel
        if level > 6:
            level = 6
-- 
2.25.1
Thanks!

To git@git.sr.ht:~sircmpwn/core.sr.ht
   6003ccc..555e10e  master -> master
builds.sr.ht
core.sr.ht/patches: FAILED in 19m1s

[Add bare anchor tag for header link][0] from [gildarts][1]

[0]: https://lists.sr.ht/~sircmpwn/sr.ht-dev/patches/13918
[1]: mailto:gildarts@orbital.rocks

✗ #304927 FAILED core.sr.ht/patches/archlinux.yml https://builds.sr.ht/~sircmpwn/job/304927
✗ #304926 FAILED core.sr.ht/patches/alpine.yml    https://builds.sr.ht/~sircmpwn/job/304926
✗ #304928 FAILED core.sr.ht/patches/debian.yml    https://builds.sr.ht/~sircmpwn/job/304928