From 2dda2e80b258087f01f44a0a37ffbdf69412d65e Mon Sep 17 00:00:00 2001 From: Will McGugan Date: Sun, 13 Sep 2020 13:16:55 +0100 Subject: [PATCH] docs --- rich/syntax.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rich/syntax.py b/rich/syntax.py index 81628de8..fe0a03f5 100644 --- a/rich/syntax.py +++ b/rich/syntax.py @@ -174,10 +174,14 @@ class Syntax(JupyterMixin): return style def highlight(self, code: str = None) -> Text: - """Highlight a string with the given lexter and return a Text instance. + """Highlight code and return a Text instance. + + Args: + code (Optional[str], optional). Highlight code if a str is given, or + None to use self.code. Returns: - Text: A text instance containing highlights. + Text: A text instance containing syntax highlight. """ if code is None: code = self.code