Skip to content

Commit

Permalink
[interface] add color_h1 for markdown formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
anjakefala committed Nov 25, 2023
1 parent 831acc2 commit f857aaf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions visidata/cliptext.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def clipdraw_chunks(scr, y, x, chunks, cattr:ColorAttr=ColorAttr(), w=None, clea
def _markdown_to_internal(text):
'Return markdown-formatted `text` converted to internal formatting (like `[:color]text[/]`).'
text = re.sub(r'`(.*?)`', r'[:code]\1[/]', text)
text = re.sub(r'(#.*?)$', r'[:h1]\1[/]', text)
text = re.sub(r'\*\*(.*?)\*\*', r'[:bold]\1[/]', text)
text = re.sub(r'\*(.*?)\*', r'[:italic]\1[/]', text)
text = re.sub(r'\b_(.*?)_\b', r'[:underline]\1[/]', text)
Expand Down
1 change: 1 addition & 0 deletions visidata/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
vd.theme_option('color_selected_row', '215 yellow', 'color of selected rows')
vd.theme_option('color_clickable', 'underline', 'color of internally clickable item')
vd.theme_option('color_code', 'bold white on 237', 'color of code sample')
vd.theme_option('color_h1', 'bold 209', 'color of h1 header')

vd.theme_option('force_256_colors', False, 'use 256 colors even if curses reports fewer')

Expand Down

0 comments on commit f857aaf

Please # to comment.