@@ -309,7 +309,7 @@ def extendMarkdown(self, md):
309309
310310class EmojiInlinePattern (markdown .inlinepatterns .InlineProcessor ):
311311
312- def handleMatch (self , m : re .Match [str ], data : str ) -> tuple [etree .Element | None , int | None , int | None ]:
312+ def handleMatch (self , m : re .Match [str ], data : str ) -> tuple [etree .Element | str | None , int | None , int | None ]:
313313 emoji_code = m .group (1 )
314314 return emoji .emojize (emoji_code , language = "alias" ), m .start (0 ), m .end (0 )
315315
@@ -325,7 +325,7 @@ def extendMarkdown(self, md):
325325
326326class UserMentionInlinePattern (markdown .inlinepatterns .InlineProcessor ):
327327
328- def handleMatch (self , m : re .Match [str ], data : str ) -> tuple [etree .Element | None , int | None , int | None ]:
328+ def handleMatch (self , m : re .Match [str ], data : str ) -> tuple [etree .Element | str | None , int | None , int | None ]:
329329 user_name = m .group (1 ).replace ("@" , "" )
330330 user = M .User .by_username (user_name )
331331 result = None
@@ -429,15 +429,18 @@ def __init__(self, *args, **kwargs):
429429 self .macro = macro .parse (self .ext ._macro_context )
430430 super ().__init__ (* args , ** kwargs )
431431
432- def handleMatch (self , m : re .Match [str ], data : str ) -> tuple [etree .Element | None , int | None , int | None ]:
432+ def handleMatch (self , m : re .Match [str ], data : str ) -> tuple [etree .Element | str | None , int | None , int | None ]:
433433 html = self .macro (m .group (1 ))
434434 placeholder = self .md .htmlStash .store (html )
435435 return placeholder , m .start (0 ), m .end (0 )
436436
437437
438438class ForgeLinkTreeProcessor (markdown .treeprocessors .Treeprocessor ):
439+ '''
440+ Wraps artifact links with [] and tracks those artifact links for search.find_shortlinks
439441
440- '''Wraps artifact links with []'''
442+ The 'alink' class itself is not currently needed for any JS/CSS but ends up in HTML anyway
443+ '''
441444
442445 def __init__ (self , parent ):
443446 self .parent = parent
@@ -544,7 +547,7 @@ def run(self, text):
544547
545548class AutolinkPattern (markdown .inlinepatterns .InlineProcessor ):
546549
547- def handleMatch (self , m : re .Match [str ], data : str ) -> tuple [etree .Element | None , int | None , int | None ]:
550+ def handleMatch (self , m : re .Match [str ], data : str ) -> tuple [etree .Element | str | None , int | None , int | None ]:
548551 old_link = m .group (1 )
549552 result = etree .Element ('a' )
550553 result .text = old_link
0 commit comments