Reduce priority of subreddit, redditor markdown rules.

So that you can put /r/ inside of a link []() and the link
takes precedence.
This commit is contained in:
voussoir 2021-10-10 11:45:00 -07:00
parent a01011230d
commit 1be7664c6d
No known key found for this signature in database
GPG key ID: 5F7554F8C26DACCB

View file

@ -154,10 +154,10 @@ class VoussoirInline(mistune.InlineLexer):
default_rules.insert(0, 'supers_many') default_rules.insert(0, 'supers_many')
default_rules.insert(0, 'footnote_link') default_rules.insert(0, 'footnote_link')
default_rules.insert(0, 'footnote_text') default_rules.insert(0, 'footnote_text')
default_rules.insert(0, 'subreddit')
default_rules.insert(0, 'redditor')
default_rules.insert(0, 'dash_spacer') default_rules.insert(0, 'dash_spacer')
default_rules.insert(0, 'youtube_embed') default_rules.insert(0, 'youtube_embed')
default_rules.append('subreddit')
default_rules.append('redditor')
def __init__(self, renderer, **kwargs): def __init__(self, renderer, **kwargs):
rules = VoussoirInlineGrammar() rules = VoussoirInlineGrammar()