3
3
import argparse
4
4
import sys
5
5
6
- from markdownify import markdownify
6
+ from markdownify import markdownify , ATX , ATX_CLOSED , UNDERLINED , \
7
+ SPACES , BACKSLASH , ASTERISK , UNDERSCORE
7
8
8
9
9
10
def main (argv = sys .argv [1 :]):
@@ -28,19 +29,23 @@ def main(argv=sys.argv[1:]):
28
29
parser .add_argument ('--default-title' , action = 'store_false' ,
29
30
help = "A boolean to enable setting the title of a link to its "
30
31
"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 ),
33
34
help = "Defines how headings should be converted." )
34
35
parser .add_argument ('-b' , '--bullets' , default = '*+-' ,
35
36
help = "A string of bullet styles to use; the bullet will "
36
37
"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 ),
39
40
help = "Use * or _ to convert strong and italics text" ),
40
41
parser .add_argument ('--sub-symbol' , default = '' ,
41
42
help = "Define the chars that surround '<sub>'." )
42
43
parser .add_argument ('--sup-symbol' , default = '' ,
43
44
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." )
44
49
parser .add_argument ('--code-language' , default = '' ,
45
50
help = "Defines the language that should be assumed for all "
46
51
"'<pre>' sections." )
0 commit comments