Comments (1)
Hi @wangchang327, thanks for filing this, and for the detailed example.
We use rich to handle line wrapping, and I think you'll have better luck reporting this issue there rather than having someone trying to make an exception in jrnl. The wrapping behavior is consistent (it always wraps on spaces when spaces exist), but maybe they'll have a solution.
I did at least confirm that it is an issue with rich independent of jrnl. I'm sharing my test script here in case that helps:
from rich.console import Console
from rich.text import Text
mixed_string = """
鑑於對人類家庭所有some English words成員的固有尊嚴some English words及其平等的和不移的權some English words利的承認,乃是世界自由、正義與和平的基礎
人類社会のすべての構成員の固有のsome English words尊厳と平等で譲ることのできない権利とをsome English words承認することは
人人生而自由,在尊嚴和權利上一律平等。他們賦有理性和良心,並應以兄弟關係的精神相對待。人人有資格享受本宣言所載的一切權利和自由,不分種族、膚色、性別、語言、宗教、政治或其他見解、國籍或社會出身、財產、出生或其他身分等任何區別。"
"""
richtext = Text.from_ansi(mixed_string, no_wrap=False, tab_size=None)
console = Console(width=80, force_terminal=True)
with console.capture() as capture:
console.print(richtext, sep="", end="")
print(capture.get())
Otherwise, I'm closing this as won't fix, but if you do choose to file an issue with rich, feel free to link back to this.
from jrnl.
Related Issues (20)
- DeprecationWarning from parsedatetime when running tests
- Update from `4.0.1_4` to `4.0.1_5` broke something with colors HOT 3
- Crash in v4.0.1_5 (Homebrew) HOT 2
- Application failing to start in MacOS after installing 4.1 in HomeBrew HOT 9
- I can´t encrypt my journal HOT 3
- Maintainers on vacation December 2023
- Don't include ANSI codes when output is non-interactive HOT 4
- Ignore color when used in a pipeline HOT 1
- How can I set macOS TextEdit as external editor? HOT 3
- Strange behavior for the "-on" flag HOT 4
- Add 1password support for saving and retrieving jrnl passwords
- Feature: Import from org-journal
- How to update jrnl from the version 2.8.4 to the last one (4.1) HOT 2
- Bug Report HOT 1
- Feature Report Add a config option to output any new entries to the terminal after submission.
- Tests failing on develop branch starting with pytest-bdd 7.1.2 HOT 4
- -contains doesn't accept multiple search terms, doesn't work with -and HOT 2
- Tests are failing with pytest 8.1
- [Bug Report] AttributeError: '_PasswordRetriever' object has no attribute 'encode' HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jrnl.