Skip to content

Commit 4fb451f

Browse files
committed
fixed cli parameters
closes #75
1 parent e8d041c commit 4fb451f

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

markdownify/main.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import argparse
44
import sys
55

6-
from markdownify import markdownify
6+
from markdownify import markdownify, ATX, ATX_CLOSED, UNDERLINED, \
7+
SPACES, BACKSLASH, ASTERISK, UNDERSCORE
78

89

910
def 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

Comments
 (0)