rename method

This commit is contained in:
Will McGugan 2020-09-18 16:23:44 +01:00
parent 7e9bd93615
commit d354d17783
3 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New ansi_dark and ansi_light themes
- Added Text.append_tokens for fast appending of string + Style pairs
- Added Text.remove_suffix
- Added Text.append_tokens
### Changed

View File

@ -432,7 +432,7 @@ class Syntax(JupyterMixin):
code = textwrap.dedent(self.code) if self.dedent else self.code
code = code.expandtabs(self.tab_size)
text = self.highlight(code)
text.removesuffix("\n")
text.remove_suffix("\n")
text.expand_tabs(self.tab_size)
if not self.line_numbers:
# Simple case of just rendering text

View File

@ -356,7 +356,7 @@ class Text(JupyterMixin):
return
self._spans.append(Span(start, min(length, end), style))
def removesuffix(self, suffix: str) -> None:
def remove_suffix(self, suffix: str) -> None:
"""Remove a suffix if it exists.
Args: