File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
# Extracted and modified from https://github.com/ewels/rich-click
2
2
3
3
import inspect
4
+ import io
4
5
import sys
5
6
from collections import defaultdict
6
7
from gettext import gettext as _
@@ -717,9 +718,8 @@ def rich_to_html(input_text: str) -> str:
717
718
This function does not provide a full HTML page, but can be used to insert
718
719
HTML-formatted text spans into a markdown file.
719
720
"""
720
- console = Console (record = True , highlight = False )
721
+ console = Console (record = True , highlight = False , file = io . StringIO () )
721
722
722
- with console .capture ():
723
- console .print (input_text , overflow = "ignore" , crop = False )
723
+ console .print (input_text , overflow = "ignore" , crop = False )
724
724
725
725
return console .export_html (inline_styles = True , code_format = "{code}" ).strip ()
You can’t perform that action at this time.
0 commit comments