better naming for markup variables
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user