From 1be7664c6db6b202898e3acdf50b7689d02584fc Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 10 Oct 2021 11:45:00 -0700 Subject: [PATCH] Reduce priority of subreddit, redditor markdown rules. So that you can put /r/ inside of a link []() and the link takes precedence. --- voussoir.net/writing/vmarkdown.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/voussoir.net/writing/vmarkdown.py b/voussoir.net/writing/vmarkdown.py index def312c..e72c1cd 100644 --- a/voussoir.net/writing/vmarkdown.py +++ b/voussoir.net/writing/vmarkdown.py @@ -154,10 +154,10 @@ class VoussoirInline(mistune.InlineLexer): default_rules.insert(0, 'supers_many') default_rules.insert(0, 'footnote_link') 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, 'youtube_embed') + default_rules.append('subreddit') + default_rules.append('redditor') def __init__(self, renderer, **kwargs): rules = VoussoirInlineGrammar()