add options for sub and sup tags

fixes #44
This commit is contained in:
AlexVonB
2021-05-30 19:07:43 +02:00
parent 6f3732307d
commit a6a31624ad
3 changed files with 25 additions and 4 deletions

View File

@@ -66,14 +66,16 @@ def _todict(obj):
class MarkdownConverter(object):
class DefaultOptions:
strip = None
convert = None
autolinks = True
bullets = '*+-' # An iterable of bullet types.
convert = None
default_title = False
heading_style = UNDERLINED
bullets = '*+-' # An iterable of bullet types.
strong_em_symbol = ASTERISK
newline_style = SPACES
strip = None
strong_em_symbol = ASTERISK
sub_symbol = ''
sup_symbol = ''
class Options(DefaultOptions):
pass
@@ -325,6 +327,10 @@ class MarkdownConverter(object):
convert_samp = convert_code
convert_sub = abstract_inline_conversion(lambda self: self.options['sub_symbol'])
convert_sup = abstract_inline_conversion(lambda self: self.options['sup_symbol'])
def convert_table(self, el, text, convert_as_inline):
return '\n\n' + text + '\n'