Skip to content

Commit

Permalink
better naming for markup variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVonB committed Jun 23, 2024
1 parent 7861b33 commit 50b4640
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions markdownify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ def abstract_inline_conversion(markup_fn):
references to self.strong_em_symbol etc.
"""
def implementation(self, el, text, convert_as_inline):
markup = markup_fn(self)
if markup.startswith('<') and markup.endswith('>'):
markup_after = '</' + markup[1:]
markup_prefix = markup_fn(self)
if markup_prefix.startswith('<') and markup_prefix.endswith('>'):
markup_suffix = '</' + markup_prefix[1:]
else:
markup_after = markup
markup_suffix = markup_prefix
if el.find_parent(['pre', 'code', 'kbd', 'samp']):
return text
prefix, suffix, text = chomp(text)
if not text:
return ''
return '%s%s%s%s%s' % (prefix, markup, text, markup_after, suffix)
return '%s%s%s%s%s' % (prefix, markup_prefix, text, markup_suffix, suffix)
return implementation


Expand Down

0 comments on commit 50b4640

Please sign in to comment.