axiros / terminal_markdown_viewer

Styled Terminal Markdown Viewer
Other
1.8k stars 105 forks source link

Consider using colorama to make ANSI escapes friendlier for Windows. #91

Open Vbbab opened 3 years ago

Vbbab commented 3 years ago

Currently, by looking at the output of mdv on Windows:

Header 1

it appears that ANSI escapes for color are used. Windows does not natively support this, however.

There is a wrapper library called colorama which will allow ANSI escapes to be properly utilized by Windows.

Example:

import colorama  # pip install colorama

colorama.init()

# All print() calls with ANSI escapes now work on Windows

Consider using this to make mdv more friendly for Windows?