resolved RESOLVED UNSUBMITTED PASS · None tool calls · 0 s · Textualize/rich
(not found in data/tasks.jsonl)
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [Unreleased]
+
+### Fixed
+
+- Add missing `end` keyword argument to `Text.from_markup`
+
## [12.0.1] - 2022-03-22
### Changed
--- a/rich/text.py
+++ b/rich/text.py
@@ -253,6 +253,7 @@ class Text(JupyterMixin):
emoji_variant: Optional[EmojiVariant] = None,
justify: Optional["JustifyMethod"] = None,
overflow: Optional["OverflowMethod"] = None,
+ end: str = "\n",
) -> "Text":
"""Create Text instance from markup.
@@ -261,6 +262,7 @@ class Text(JupyterMixin):
emoji (bool, optional): Also render emoji code. Defaults to True.
justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
+ end (str, optional): Character to end text with. Defaults to "\\\\n".
Returns:
Text: A Text instance with markup rendered.
@@ -270,6 +272,7 @@ class Text(JupyterMixin):
rendered_text = render(text, style, emoji=emoji, emoji_variant=emoji_variant)
rendered_text.justify = justify
rendered_text.overflow = overflow
+ rendered_text.end = end
return rendered_text
@classmethod
........................................................................ [ 86%] ........... [100%] 83 passed in 0.19s