Skip to content

Commit

Permalink
macro styling bug (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
nschneid committed Dec 18, 2021
1 parent 12a9898 commit f71e55e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/wiki/plugins/macros/mdx/macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def ss(self, **kwargs):
if len(args) >= 2:
cl = args[1]

self_reference = args[0] == escape_patterns_in_string(self.markdown.article.current_revision.title)
self_reference = (args[0] == escape_patterns_in_string(self.markdown.article.current_revision.title))

if '--' in args[0]:
ss1, ss2 = get_supersenses_for_construal(args[0])
Expand All @@ -272,10 +272,11 @@ def ss(self, **kwargs):
clink = construal_link(ss1, ss2, '/' + args[0], cl if cl else 'construal')
return clink
else:
supersense = get_supersense(args[0])
supersense = get_supersense(args[0]) # Will be None for `i, which is technically a Construal
display = args[0].replace('`', r'\`')
cls = cl or 'supersense'
if args[0] in ['??', '`d', '`i', '`c', '`$']:
# Note: args[0] is escaped at this point for `i etc. (will be unescaped before rendering; set cls=str(list(args[0])) to debug)
if args[0]==escape_patterns_in_string('??') or escape_patterns_in_string('`') in args[0]:
cls = cl or 'misc-label'
if self_reference:
span = etree.Element("span")
Expand Down

0 comments on commit f71e55e

Please sign in to comment.