returned option to disable markdown coloring
This commit is contained in:
@@ -222,8 +222,8 @@ Keyboard shortcuts:
|
|||||||
help="Exit after last slide.")
|
help="Exit after last slide.")
|
||||||
parser.add_argument("--export",action="store",dest="screenshots",default=False,
|
parser.add_argument("--export",action="store",dest="screenshots",default=False,
|
||||||
type=str, help="Take screenshots of the slideshow in the given folder.")
|
type=str, help="Take screenshots of the slideshow in the given folder.")
|
||||||
parser.add_argument("-m",action="store_true",dest="autocolor",default=False,
|
parser.add_argument("-m",action="store_false",dest="autocolor",default=True,
|
||||||
help="Color by markdown structure.")
|
help="Disable color by markdown structure.")
|
||||||
parser.add_argument("--no-color","-n",action="store_false",dest="color",default=True,
|
parser.add_argument("--no-color","-n",action="store_false",dest="color",default=True,
|
||||||
help="Disable color.")
|
help="Disable color.")
|
||||||
parser.add_argument("-s",action="store_false",dest="menu",default=True,
|
parser.add_argument("-s",action="store_false",dest="menu",default=True,
|
||||||
@@ -266,7 +266,13 @@ def page_print(reader,opts,offset):
|
|||||||
|
|
||||||
# Print page rows
|
# Print page rows
|
||||||
parsed=md_color.parse(page)
|
parsed=md_color.parse(page)
|
||||||
colored=md_color.colorize(parsed,not opts.color,opts.dark_colors)
|
if opts.autocolor:
|
||||||
|
colored=md_color.colorize(parsed,not opts.color,opts.dark_colors)
|
||||||
|
else:
|
||||||
|
if opts.color:
|
||||||
|
colored=[bc.color_string(row[1]) for row in parsed]
|
||||||
|
else:
|
||||||
|
colored=[bc.nocolor_string(row[1]) for row in parsed]
|
||||||
r=0
|
r=0
|
||||||
for row_i in range(len(page)):
|
for row_i in range(len(page)):
|
||||||
if row_i==0: continue
|
if row_i==0: continue
|
||||||
|
|||||||
Reference in New Issue
Block a user