From 7df2aaccc135e6f38ba7fc00e837f0cd85d158ba Mon Sep 17 00:00:00 2001 From: "Paulo S. Costa" Date: Thu, 3 Feb 2022 22:29:03 -0800 Subject: [PATCH] Document '{stylesheet}' in code_format --- rich/console.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rich/console.py b/rich/console.py index fbf87bd5..e2d7a6d5 100644 --- a/rich/console.py +++ b/rich/console.py @@ -2060,8 +2060,8 @@ class Console: Args: theme (TerminalTheme, optional): TerminalTheme object containing console colors. clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. - code_format (str, optional): Format string to render HTML, should contain {foreground} - {background} and {code}. + code_format (str, optional): Format string to render HTML. In addition to '{foreground}', + '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``. inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag. Defaults to False. @@ -2137,8 +2137,8 @@ class Console: path (str): Path to write html file. theme (TerminalTheme, optional): TerminalTheme object containing console colors. clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. - code_format (str, optional): Format string to render HTML, should contain {foreground} - {background} and {code}. + code_format (str, optional): Format string to render HTML. In addition to '{foreground}', + '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``. inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag. Defaults to False.