mirror of https://github.com/Textualize/rich.git
word wrap code blocks
This commit is contained in:
parent
fcbeffcfa1
commit
9762a2f116
|
@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Fixed exception in IPython when disabling pprint with %pprint https://github.com/willmcgugan/rich/issues/1646
|
||||
- Fixed issue where values longer than the console width produced invalid JSON https://github.com/willmcgugan/rich/issues/1653
|
||||
|
||||
## Changed
|
||||
|
||||
- Markdown codeblocks now word-wrap https://github.com/willmcgugan/rich/issues/1515
|
||||
|
||||
## [10.12.0] - 2021-10-06
|
||||
|
||||
### Updated
|
||||
|
|
|
@ -177,7 +177,7 @@ class CodeBlock(TextElement):
|
|||
) -> RenderResult:
|
||||
code = str(self.text).rstrip()
|
||||
syntax = Panel(
|
||||
Syntax(code, self.lexer_name, theme=self.theme),
|
||||
Syntax(code, self.lexer_name, theme=self.theme, word_wrap=True),
|
||||
border_style="dim",
|
||||
box=box.SQUARE,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue