33import argparse
44import sys
55
6- from markdownify import markdownify
6+ from markdownify import markdownify , ATX , ATX_CLOSED , UNDERLINED , \
7+ SPACES , BACKSLASH , ASTERISK , UNDERSCORE
78
89
910def main (argv = sys .argv [1 :]):
@@ -28,19 +29,23 @@ def main(argv=sys.argv[1:]):
2829 parser .add_argument ('--default-title' , action = 'store_false' ,
2930 help = "A boolean to enable setting the title of a link to its "
3031 "href, if no title is given." )
31- parser .add_argument ('--heading-style' , default = ' UNDERLINED' ,
32- choices = (' ATX' , ' ATX_CLOSED' , 'SETEXT' , ' UNDERLINED' ),
32+ parser .add_argument ('--heading-style' , default = UNDERLINED ,
33+ choices = (ATX , ATX_CLOSED , UNDERLINED ),
3334 help = "Defines how headings should be converted." )
3435 parser .add_argument ('-b' , '--bullets' , default = '*+-' ,
3536 help = "A string of bullet styles to use; the bullet will "
3637 "alternate based on nesting level." )
37- parser .add_argument ('--strong-em-symbol' , default = ' ASTERISK' ,
38- choices = (' ASTERISK' , ' UNDERSCORE' ),
38+ parser .add_argument ('--strong-em-symbol' , default = ASTERISK ,
39+ choices = (ASTERISK , UNDERSCORE ),
3940 help = "Use * or _ to convert strong and italics text" ),
4041 parser .add_argument ('--sub-symbol' , default = '' ,
4142 help = "Define the chars that surround '<sub>'." )
4243 parser .add_argument ('--sup-symbol' , default = '' ,
4344 help = "Define the chars that surround '<sup>'." )
45+ parser .add_argument ('--newline-style' , default = SPACES ,
46+ choices = (SPACES , BACKSLASH ),
47+ help = "Defines the style of <br> conversions: two spaces "
48+ "or backslash at the and of the line thet should break." )
4449 parser .add_argument ('--code-language' , default = '' ,
4550 help = "Defines the language that should be assumed for all "
4651 "'<pre>' sections." )
0 commit comments