##// END OF EJS Templates
fix ansi coloring...
MinRK -
Show More
@@ -122,12 +122,13 def single_ansi2latex(code):
122 color_code = style_code.split(';')[1]
122 color_code = style_code.split(';')[1]
123 is_normal = style_code.split(';')[0] == '0'
123 is_normal = style_code.split(';')[0] == '0'
124
124
125 # regular fonts
125 # regular weight
126 if (code == style_code) or (is_normal and code == color_code):
126 if (code == style_code) or (is_normal and code == color_code):
127 return '\\'+color[0].lower()+'{', 1
127
128 # bold fonts
128 return r'{\color{'+color[0].lower()+'}', 1
129 # bold
129 if code == style_code[:3]+str(1)+style_code[3:]:
130 if code == style_code[:3]+str(1)+style_code[3:]:
130 return '\\textbf{\\textcolor{'+color[0].lower()+'}{', 2
131 return r'\textbf{\color{'+color[0].lower()+'}', 1
131 return '', 0
132 return '', 0
132
133
133 def ansi2latex(text):
134 def ansi2latex(text):
General Comments 0
You need to be logged in to leave comments. Login now