-
Notifications
You must be signed in to change notification settings - Fork 381
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
Allow --width=0
to disable wordwrap
#366
Allow --width=0
to disable wordwrap
#366
Conversation
Markdown shouldn't word wrap in code blocks at all, I think, though CommonMark should be checked. I've not really used glow much myself because it doesn't seem to care about how markdown should be displayed (hard line breaks also aren't supported despite a PR existing for a month now? with no issues mentioned left to go) but I would suspect that the correct solution here too would be to not require an argument and just print markdown correctly. I like the suggestion too though. |
Join. If i open with the pager
|
thanks! |
⚠️ **CAUTION: this is a major update, indicating a breaking change!**⚠️ This MR contains the following updates: | Package | Update | Change | |---|---|---| | [charmbracelet/glow](https://github.com/charmbracelet/glow) | major | `v1.5.1` -> `v2.0.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>charmbracelet/glow (charmbracelet/glow)</summary> ### [`v2.0.0`](https://github.com/charmbracelet/glow/releases/tag/v2.0.0) [Compare Source](charmbracelet/glow@v1.5.1...v2.0.0) ### Hello v2! This release contains a massive amount of bug fixes and rendering improvements, many of which come by way of [Glamour v0.8.0](https://github.com/charmbracelet/glamour/releases/tag/v0.8.0) which was released a few weeks ago. As a bonus, the latest version of Glamour includes support for Tokyo Night. ```bash glow -s "tokyo-night" ``` <img alt="Tokyo Night x Glamour" src="https://github.com/charmbracelet/glamour/blob/master/styles/gallery/tokyo-night.png" width="600"> Additionally, the stash feature has been removed. #### Changelog ##### New! - [`d89d79a`](charmbracelet/glow@d89d79a): feat: --preserve-new-lines ([#​623](charmbracelet/glow#623)) ([@​caarlos0](https://github.com/caarlos0)) - [`b1d3772`](charmbracelet/glow@b1d3772): feat: add 'r' to refresh list and document ([#​624](charmbracelet/glow#624)) ([@​caarlos0](https://github.com/caarlos0)) - [`96d2a38`](charmbracelet/glow@96d2a38): feat: allow --width=0 to disable wordwrap ([#​366](charmbracelet/glow#366)) ([@​applejag](https://github.com/applejag)) - [`fe066f2`](charmbracelet/glow@fe066f2): feat: allow config from CHARM_CONFIG_HOME and XDG_CONFIG_HOME ([#​621](charmbracelet/glow#621)) ([@​caarlos0](https://github.com/caarlos0)) - [`9ebe39c`](charmbracelet/glow@9ebe39c): feat: improve gitlab/github readme url ([#​456](charmbracelet/glow#456)) ([@​caarlos0](https://github.com/caarlos0)) - [`f1cf0ba`](charmbracelet/glow@f1cf0ba): feat: man pages ([@​caarlos0](https://github.com/caarlos0)) - [`597e56b`](charmbracelet/glow@597e56b): feat: open editor in current line ([@​caarlos0](https://github.com/caarlos0)) - [`d7032fe`](charmbracelet/glow@d7032fe): feat: shell completions ([@​caarlos0](https://github.com/caarlos0)) - [`2d5bd3b`](charmbracelet/glow@2d5bd3b): feat: show line numbers configuration option ([@​caarlos0](https://github.com/caarlos0)) - [`0dcf127`](charmbracelet/glow@0dcf127): feat: suspend ([@​caarlos0](https://github.com/caarlos0)) - [`c991ec4`](charmbracelet/glow@c991ec4): feat: use x/editor ([#​543](charmbracelet/glow#543)) ([@​caarlos0](https://github.com/caarlos0)) ##### Fixed! - [`9c79fa1`](charmbracelet/glow@9c79fa1): fix(ci): remove soft-serve workflow ([@​aymanbagabas](https://github.com/aymanbagabas)) - [`bccf3d0`](charmbracelet/glow@bccf3d0): fix(ci): update coverage workflow ([@​aymanbagabas](https://github.com/aymanbagabas)) - [`08c564c`](charmbracelet/glow@08c564c): fix: --all bypass .gitignore rules ([#​285](charmbracelet/glow#285)) ([#​504](charmbracelet/glow#504)) ([@​aitva](https://github.com/aitva)) - [`8e51396`](charmbracelet/glow@8e51396): fix: check other possible readme paths/branches ([#​450](charmbracelet/glow#450)) ([@​caarlos0](https://github.com/caarlos0)) - [`1133e50`](charmbracelet/glow@1133e50): fix: config failing in tests ([#​625](charmbracelet/glow#625)) ([@​caarlos0](https://github.com/caarlos0)) - [`2288311`](charmbracelet/glow@2288311): fix: do not hard fail if no config ([@​caarlos0](https://github.com/caarlos0)) - [`821d51d`](charmbracelet/glow@821d51d): fix: do not show absolute path as note ([@​caarlos0](https://github.com/caarlos0)) - [`247c707`](charmbracelet/glow@247c707): fix: glow URL ([@​caarlos0](https://github.com/caarlos0)) - [`a1a8563`](charmbracelet/glow@a1a8563): fix: handle not being able to create log file ([@​caarlos0](https://github.com/caarlos0)) - [`b80e831`](charmbracelet/glow@b80e831): fix: handle permission denied ([@​caarlos0](https://github.com/caarlos0)) - [`54dd62a`](charmbracelet/glow@54dd62a): fix: handle running inside a snap ([#​527](charmbracelet/glow#527)) ([@​caarlos0](https://github.com/caarlos0)) - [`ad01f38`](charmbracelet/glow@ad01f38): fix: improve line no ([@​caarlos0](https://github.com/caarlos0)) - [`f44e5b5`](charmbracelet/glow@f44e5b5): fix: improve message ([@​caarlos0](https://github.com/caarlos0)) - [`7e471f1`](charmbracelet/glow@7e471f1): fix: lint issue ([@​caarlos0](https://github.com/caarlos0)) - [`e4cacf7`](charmbracelet/glow@e4cacf7): fix: mkdir cache dir ([@​caarlos0](https://github.com/caarlos0)) - [`1407793`](charmbracelet/glow@1407793): fix: pass color profile down to glamour ([#​626](charmbracelet/glow#626)) ([@​caarlos0](https://github.com/caarlos0)) - [`9a3f7a1`](charmbracelet/glow@9a3f7a1): fix: replace string concatenation in loop with string builder ([#​505](charmbracelet/glow#505)) ([@​appgurueu](https://github.com/appgurueu)) - [`cd99146`](charmbracelet/glow@cd99146): fix: update codeowners ([#​637](charmbracelet/glow#637)) ([@​caarlos0](https://github.com/caarlos0)) - [`3f9102d`](charmbracelet/glow@3f9102d): fix: yet another log handling fix ([@​caarlos0](https://github.com/caarlos0)) ##### Deps - [`c89c8bd`](charmbracelet/glow@c89c8bd): feat: update glamour ([#​634](charmbracelet/glow#634)) ([@​caarlos0](https://github.com/caarlos0)) - [`4578bc1`](charmbracelet/glow@4578bc1): feat: updating glamour ([#​631](charmbracelet/glow#631)) ([@​caarlos0](https://github.com/caarlos0)) ##### Other Stuff - [`d2e7742`](charmbracelet/glow@d2e7742): chore(ci): enable gofumpt ([@​aymanbagabas](https://github.com/aymanbagabas)) - [`736e77d`](charmbracelet/glow@736e77d): feat!: rename module to /v2 ([#​640](charmbracelet/glow#640)) ([@​caarlos0](https://github.com/caarlos0)) *** <details> <summary>Verifying the artifacts</summary> First, download the [`checksums.txt` file](https://github.com/charmbracelet/glow/releases/download/2.0.0/checksums.txt), for example, with `wget`: ```bash wget 'https://github.com/charmbracelet/glow/releases/download/v2.0.0/checksums.txt' ``` Then, verify it using [`cosign`](https://github.com/sigstore/cosign): ```bash cosign verify-blob \ --certificate-identity 'https://github.com/charmbracelet/meta/.github/workflows/goreleaser.yml@refs/heads/main' \ --certificate-oidc-issuer 'https://token.actions.githubusercontent.com' \ --cert 'https://github.com/charmbracelet/glow/releases/download/v2.0.0/checksums.txt.pem' \ --signature 'https://github.com/charmbracelet/glow/releases/download/v2.0.0/checksums.txt.sig' \ ./checksums.txt ``` If the output is `Verified OK`, you can safely use it to verify the checksums of other artifacts you downloaded from the release using `sha256sum`: ```bash sha256sum --ignore-missing -c checksums.txt ``` Done! You artifacts are now verified! </details> <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@​charm), or on [Discord](https://charm.sh/chat). </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
The wordwrapping makes it much more difficult to copy snippets from the terminal. Especially with code blocks.
The best option would be if I could disable wordwrap only for code blocks, but this is an easy long-hanging fruit.