Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

width does not adhere to its nominal value #668

Open
csabahenk opened this issue Dec 21, 2024 · 0 comments
Open

width does not adhere to its nominal value #668

csabahenk opened this issue Dec 21, 2024 · 0 comments

Comments

@csabahenk
Copy link

Describe the bug

Whatever value of width is used - either given explicitly on command line with -w, or taken from config or terminal width - the actual output width does not adhere to this value strictly, resultng in garbled render.

Setup

glow in between 4578bc1 and 7b3bfac (master as of writing this). The former commit is what actually brought in the issue (I've bisected it).

So the last release prior to the issue was v1.5.1, and subsequent v2.0.0 is already affected.

To Reproduce

$ glow -w 80 sample.md | ruby -ne 'puts $_.size' | sort | uniq
1
83
84

Line lengths exceed the specified width.

Screenshots

For the captures below, glow was called as

$ glow -w $(stty size | awk '{print $2}') sample.md

ie. forcing nominal output width to terminal width, to avoid hitting #666.

On the left, we can see the garbled render of v2.0.0; on the right, we can see the proper render of v1.5.1.

glow-render.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant