fix(deps): update module github.com/charmbracelet/glamour to v2 #10

Open
renovate-bot wants to merge 1 commit from renovate/github.com-charmbracelet-glamour-2.x into main
Collaborator

This PR contains the following updates:

Package Change Age Confidence
github.com/charmbracelet/glamour v0.10.0 → v2.0.1 age confidence

⚠️ Warning

Some dependencies could not be looked up. Check the Dependency Dashboard for more information.


Release Notes

charmbracelet/glamour (github.com/charmbracelet/glamour)

v2.0.1

Compare Source

Changelog

Bug fixes
Other work

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v2.0.0

Compare Source

What's New in Glamour v2

We're excited to announce the second major release of Glamour!

If you (or your LLM) are just looking for technical details on migrating from v1, please check out the Upgrade Guide.

[!NOTE]
We don't take API changes lightly and strive to make the upgrade process as simple as possible. We believe these changes bring necessary improvements and pave the way for the future. If something feels way off, let us know.

❤️ Charm Land Import Path

We've updated our import paths to use vanity domains and use our domain to import Go packages.

// Before
import "github.com/charmbracelet/glamour"

// After
import "charm.land/glamour/v2"

💄 Lip Gloss v2 Integration

Glamour v2 now uses Lip Gloss v2 under the hood, bringing improved performance and more consistent styling across the Charm ecosystem.

Since Glamour is designed to be pure (same input = same output), it doesn't peek at your terminal's capabilities. Instead, color downsampling is handled explicitly via Lip Gloss when you're ready to render:

r, _ := glamour.NewTermRenderer(glamour.WithWordWrap(80))
out, _ := r.Render(markdown)

// Downsample colors based on terminal capabilities
lipgloss.Print(out)

No more I/O fights between Glamour and Lip Gloss. Glamour focuses on rendering, Lip Gloss handles the colors. Everyone's happy!

🌏 Better Text Wrapping

Text wrapping has been rewritten using lipgloss.Wrap, which means way better handling of:

  • Multi-byte UTF-8 characters (CJK, emojis, etc.)
  • Complex Unicode sequences
  • Terminal cell width edge cases

Your Japanese documentation, emoji-filled READMEs, and creative Unicode art will all render beautifully now.

Glamour now supports ANSI hyperlinks! If your terminal supports OSC 8 (and many modern terminals do), your links can be clickable. No changes needed, it just works.

md := `Check out [Charm](https://charm.sh) for more awesome tools!`
out, _ := glamour.Render(md, "dark")
fmt.Print(out)
// In supporting terminals, "Charm" will be clickable!
Which terminals support OSC 8 hyperlinks?

📧 Cleaner Email Rendering

Email autolinks now hide the mailto: prefix for a cleaner look while remaining functional. Because nobody wants to read mailto: in their rendered markdown.

// Before (v1): Rendered as "mailto:hello@charm.sh"
md := `Contact us at <hello@charm.sh>`
out, _ := glamour.Render(md, "dark")
// Output: mailto:hello@charm.sh (ugly!)

// After (v2): Rendered as just "hello@charm.sh"
md := `Contact us at <hello@charm.sh>`
out, _ := glamour.Render(md, "dark")
// Output: hello@charm.sh (much better!)

🌙 Dark is the New Default

The WithAutoStyle() option and AutoStyle have been removed. The default style is now "dark", which works well across most terminals. You can still explicitly choose any style:

// Use a specific style
out, _ := glamour.Render(markdown, "light")
out, _ := glamour.Render(markdown, "pink")
out, _ := glamour.Render(markdown, "dracula")
out, _ := glamour.Render(markdown, "tokyo-night")

Simpler is better!

🎨 Color Profile Changes

The WithColorProfile() option has been removed. Color adaptation is now handled by Lip Gloss when rendering output:

// Old approach (v1)
r, _ := glamour.NewTermRenderer(
    glamour.WithColorProfile(termenv.TrueColor),
)

// New approach (v2)
r, _ := glamour.NewTermRenderer(glamour.WithWordWrap(80))
out, _ := r.Render(markdown)
lipgloss.Print(out) // Handles color downsampling automatically

This separation of concerns makes Glamour's rendering more predictable and testable.

👋 Farewell, Overline

The Overlined field has been removed from all style primitives. It was rarely used and not widely supported across terminals. If you need similar visual separation, consider using underline, bold, or background colors instead.

🐛 Bug Fixes

  • Fixed CJK character rendering in margin writers
  • Fixed table background colors to match document styling
  • Improved handling of edge cases in text wrapping
  • Better handling of code spans with special characters

🌈 More on Glamour v2

Ready to migrate? Head over to the Upgrade Guide for the full migration checklist.


Changelog

New!
  • c84017c97575bf30267a367c4174f0b24b0347d1: feat(ansi): add hyperlink support (@​aymanbagabas)
Fixed
  • 087c9c64f7f609f19fa65dfa402410216ce30a85: fix(ansi): handle multi-byte UTF-8 characters correctly in margin writers (@​Gustave-241021)
  • df61d8ef25f4b202c9354cbea96f1fe2cb033725: fix(ansi): remove unused overline style (@​aymanbagabas)
  • ffb4696ed9f26c7725a8df99a1cdec615da214fa: fix(gen): style generator: use absolute path for output files (@​aymanbagabas)
  • 510d0f0fc9a8a48d03f40ff10f593346a7920905: fix(table): ensure document background color applies to table as well (#​431) (@​andreynering)
  • c0a9b8dab67213e624c0cd3bf8e6c1e4fa43dcad: fix(v2): import path /v2 (#​412) (@​caarlos0)
  • 5a8208220018be163aa17cf24554324bdb792e78: fix: hide mailto: prefix in rendered email links (@​Gustave-241021)
Docs
  • 5f3f7bee988785344390ada44344b49d16cdd33d: docs: add v2 upgrade guide + release notes (#​509) (@​aymanbagabas)
  • d1c81b3f0e972d565bbfa397e28ef4cd21732054: docs: remove WithAutoStyle in README and examples (@​meowgorithm)
  • 86f90cfe96d13d4f7fa42dca9088aa7a4dad8b43: docs: update README with v2 import paths and color downsampling example (@​aymanbagabas)
Other stuff
  • 4c9b764d46d8a9a52195bb3a98c968fdb474a09b: perf(ansi): ensure all PenWriter instances are closed (#​465) (@​tazjin)
  • f8f160e6cd7bdf8a3608b47bac64174e7ab0da15: refactor!: migrate to lipgloss v2 (@​aymanbagabas)
  • 9f9007e34076a7929769e319743e0e2f92ee5c8b: refactor(ansi): drop reflow and use cellbuf.Wrap (@​aymanbagabas)
  • 69649f93d3b1d234ee0c89b1e8f14808647fe209: refactor: migrate to charm.land module path (#​489) (@​aymanbagabas)
  • cd9a02a87169d14ef83a1f58eac5a7494b1b2c9d: refactor: remove auto style and make dark the default (@​aymanbagabas)
  • 800eb8175930e2d7ef8f1602c33cd64f96ed7401: refactor: use lipgloss wrap, nbsp for codespan, new uv api, and update testdata (@​aymanbagabas)

Feedback

Have thoughts on Glamour v2? We'd love to hear about it. Let us know on…


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source

v1.0.0

Compare Source


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate CLI.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [github.com/charmbracelet/glamour](https://github.com/charmbracelet/glamour) | `v0.10.0` → `v2.0.1` | ![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcharmbracelet%2fglamour/v2.0.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcharmbracelet%2fglamour/v0.10.0/v2.0.1?slim=true) | --- > ⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/3) for more information. --- ### Release Notes <details> <summary>charmbracelet/glamour (github.com/charmbracelet/glamour)</summary> ### [`v2.0.1`](https://github.com/charmbracelet/glamour/releases/tag/v2.0.1) [Compare Source](https://github.com/charmbracelet/glamour/compare/v2.0.0...v2.0.1) #### Changelog ##### Bug fixes - [`975a0f3`](https://github.com/charmbracelet/glamour/commit/975a0f30cc6519fde4481ab084987222c8f06c34): fix: close wrap writer before its downstream chain ([#&#8203;575](https://github.com/charmbracelet/glamour/issues/575)) ([@&#8203;taciturnaxolotl](https://github.com/taciturnaxolotl)) ##### Other work - [`c293649`](https://github.com/charmbracelet/glamour/commit/c29364924407add0616fc067e4c70ddf9a5da0dd): chore: fix pre-existing lint failures ([#&#8203;575](https://github.com/charmbracelet/glamour/issues/575)) ([@&#8203;taciturnaxolotl](https://github.com/taciturnaxolotl)) - [`95c93db`](https://github.com/charmbracelet/glamour/commit/95c93db04489cebf252ec856584445c7e85ee276): chore: bump lipgloss to v2.0.4 ([@&#8203;taciturnaxolotl](https://github.com/taciturnaxolotl)) - [`600b93a`](https://github.com/charmbracelet/glamour/commit/600b93a40bb9754522c7e3496b8b41989cf1dec7): chore: remove CODEOWNERS ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) - [`253da61`](https://github.com/charmbracelet/glamour/commit/253da61fcb275fcd28296956ffae5f7d98ff618d): fix(ci): use local golangci config ([@&#8203;aymanbagabas](https://github.com/aymanbagabas)) *** <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.social/@charm), or on [Discord](https://charm.sh/chat). ### [`v2.0.0`](https://github.com/charmbracelet/glamour/releases/tag/v2.0.0) [Compare Source](https://github.com/charmbracelet/glamour/compare/v1.0.0...v2.0.0) ### What's New in Glamour v2 We're excited to announce the second major release of Glamour! If you (or your LLM) are just looking for technical details on migrating from v1, please check out the [Upgrade Guide](https://github.com/charmbracelet/glamour/tree/main/UPGRADE_GUIDE_V2.md). > \[!NOTE] > We don't take API changes lightly and strive to make the upgrade process as simple as possible. We believe these changes bring necessary improvements and pave the way for the future. If something feels way off, let us know. #### ❤️ Charm Land Import Path We've updated our import paths to use vanity domains and use our domain to import Go packages. ```go // Before import "github.com/charmbracelet/glamour" // After import "charm.land/glamour/v2" ``` #### 💄 Lip Gloss v2 Integration Glamour v2 now uses [Lip Gloss v2][lipgloss] under the hood, bringing improved performance and more consistent styling across the Charm ecosystem. Since Glamour is designed to be pure (same input = same output), it doesn't peek at your terminal's capabilities. Instead, color downsampling is handled explicitly via Lip Gloss when you're ready to render: ```go r, _ := glamour.NewTermRenderer(glamour.WithWordWrap(80)) out, _ := r.Render(markdown) // Downsample colors based on terminal capabilities lipgloss.Print(out) ``` No more I/O fights between Glamour and Lip Gloss. Glamour focuses on rendering, Lip Gloss handles the colors. Everyone's happy! [lipgloss]: https://github.com/charmbracelet/lipgloss #### 🌏 Better Text Wrapping Text wrapping has been rewritten using `lipgloss.Wrap`, which means way better handling of: - Multi-byte UTF-8 characters (CJK, emojis, etc.) - Complex Unicode sequences - Terminal cell width edge cases Your Japanese documentation, emoji-filled READMEs, and creative Unicode art will all render beautifully now. #### 🔗 Hyperlink Support Glamour now supports ANSI hyperlinks! If your terminal supports OSC 8 (and many modern terminals do), your links can be clickable. No changes needed, it just works. ```go md := `Check out [Charm](https://charm.sh) for more awesome tools!` out, _ := glamour.Render(md, "dark") fmt.Print(out) // In supporting terminals, "Charm" will be clickable! ``` <details> <summary>Which terminals support OSC 8 hyperlinks?</summary> - [Ghostty](https://mitchellh.com/ghostty) - [Kitty](https://sw.kovidgoyal.net/kitty/) - [WezTerm](https://wezfurlong.org/wezterm/) - [iTerm2](https://iterm2.com) (v3.1+) - [Foot](https://codeberg.org/dnkl/foot) - [Alacritty](https://alacritty.org) (v0.13+) - [Rio](https://raphamorim.io/rio/) - [VTE-based terminals](https://gitlab.gnome.org/GNOME/vte) (GNOME Terminal, Tilix, etc.) </details> #### 📧 Cleaner Email Rendering Email autolinks now hide the `mailto:` prefix for a cleaner look while remaining functional. Because nobody wants to read `mailto:` in their rendered markdown. ```go // Before (v1): Rendered as "mailto:hello@charm.sh" md := `Contact us at <hello@charm.sh>` out, _ := glamour.Render(md, "dark") // Output: mailto:hello@charm.sh (ugly!) // After (v2): Rendered as just "hello@charm.sh" md := `Contact us at <hello@charm.sh>` out, _ := glamour.Render(md, "dark") // Output: hello@charm.sh (much better!) ``` #### 🌙 Dark is the New Default The `WithAutoStyle()` option and `AutoStyle` have been removed. The default style is now `"dark"`, which works well across most terminals. You can still explicitly choose any style: ```go // Use a specific style out, _ := glamour.Render(markdown, "light") out, _ := glamour.Render(markdown, "pink") out, _ := glamour.Render(markdown, "dracula") out, _ := glamour.Render(markdown, "tokyo-night") ``` Simpler is better! #### 🎨 Color Profile Changes The `WithColorProfile()` option has been removed. Color adaptation is now handled by Lip Gloss when rendering output: ```go // Old approach (v1) r, _ := glamour.NewTermRenderer( glamour.WithColorProfile(termenv.TrueColor), ) // New approach (v2) r, _ := glamour.NewTermRenderer(glamour.WithWordWrap(80)) out, _ := r.Render(markdown) lipgloss.Print(out) // Handles color downsampling automatically ``` This separation of concerns makes Glamour's rendering more predictable and testable. #### 👋 Farewell, Overline The `Overlined` field has been removed from all style primitives. It was rarely used and not widely supported across terminals. If you need similar visual separation, consider using underline, bold, or background colors instead. #### 🐛 Bug Fixes - Fixed CJK character rendering in margin writers - Fixed table background colors to match document styling - Improved handling of edge cases in text wrapping - Better handling of code spans with special characters #### 🌈 More on Glamour v2 Ready to migrate? Head over to the [Upgrade Guide](https://github.com/charmbracelet/glamour/tree/main/UPGRADE_GUIDE_V2.md) for the full migration checklist. *** <details> <summary> #### Changelog </summary ##### New! * c84017c97575bf30267a367c4174f0b24b0347d1: feat(ansi): add hyperlink support (@&#8203;aymanbagabas) ##### Fixed * 087c9c64f7f609f19fa65dfa402410216ce30a85: fix(ansi): handle multi-byte UTF-8 characters correctly in margin writers (@&#8203;Gustave-241021) * df61d8ef25f4b202c9354cbea96f1fe2cb033725: fix(ansi): remove unused overline style (@&#8203;aymanbagabas) * ffb4696ed9f26c7725a8df99a1cdec615da214fa: fix(gen): style generator: use absolute path for output files (@&#8203;aymanbagabas) * 510d0f0fc9a8a48d03f40ff10f593346a7920905: fix(table): ensure document background color applies to table as well (#&#8203;431) (@&#8203;andreynering) * c0a9b8dab67213e624c0cd3bf8e6c1e4fa43dcad: fix(v2): import path /v2 (#&#8203;412) (@&#8203;caarlos0) * 5a8208220018be163aa17cf24554324bdb792e78: fix: hide mailto: prefix in rendered email links (@&#8203;Gustave-241021) ##### Docs * 5f3f7bee988785344390ada44344b49d16cdd33d: docs: add v2 upgrade guide + release notes (#&#8203;509) (@&#8203;aymanbagabas) * d1c81b3f0e972d565bbfa397e28ef4cd21732054: docs: remove WithAutoStyle in README and examples (@&#8203;meowgorithm) * 86f90cfe96d13d4f7fa42dca9088aa7a4dad8b43: docs: update README with v2 import paths and color downsampling example (@&#8203;aymanbagabas) ##### Other stuff * 4c9b764d46d8a9a52195bb3a98c968fdb474a09b: perf(ansi): ensure all PenWriter instances are closed (#&#8203;465) (@&#8203;tazjin) * f8f160e6cd7bdf8a3608b47bac64174e7ab0da15: refactor!: migrate to lipgloss v2 (@&#8203;aymanbagabas) * 9f9007e34076a7929769e319743e0e2f92ee5c8b: refactor(ansi): drop reflow and use cellbuf.Wrap (@&#8203;aymanbagabas) * 69649f93d3b1d234ee0c89b1e8f14808647fe209: refactor: migrate to charm.land module path (#&#8203;489) (@&#8203;aymanbagabas) * cd9a02a87169d14ef83a1f58eac5a7494b1b2c9d: refactor: remove auto style and make dark the default (@&#8203;aymanbagabas) * 800eb8175930e2d7ef8f1602c33cd64f96ed7401: refactor: use lipgloss wrap, nbsp for codespan, new uv api, and update testdata (@&#8203;aymanbagabas) </details> #### Feedback Have thoughts on Glamour v2? We'd *love* to hear about it. Let us know on… - [Discord](https://charm.sh/chat) - [The Fediverse](https://mastodon.social/@charmcli) - [Twitter](https://twitter.com/charmcli) *** Part of [Charm](https://charm.sh). <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Charm热爱开源 • Charm loves open source ### [`v1.0.0`](https://github.com/charmbracelet/glamour/compare/v0.10.0...v1.0.0) [Compare Source](https://github.com/charmbracelet/glamour/compare/v0.10.0...v1.0.0) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDcuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjI0Ny4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
fix(deps): update module github.com/charmbracelet/glamour to v2
Some checks failed
CI / integration-1 (pull_request) Has been skipped
CI / e2e (pull_request) Has been skipped
renovate/artifacts Artifact file update failure
CI / integration (pull_request) Failing after 4m43s
CI / generate (pull_request) Failing after 33s
CI / build (pull_request) Failing after 33s
CI / lint (pull_request) Failing after 1m53s
CI / unit (pull_request) Failing after 1m24s
CI / ci (pull_request) Failing after 0s
7b20d04947
renovate-bot scheduled this pull request to auto merge when all checks succeed 2026-11-30 02:22:04 +00:00
Author
Collaborator

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: go.sum
go: github.com/charmbracelet/glamour/v2@v2.0.1: parsing go.mod:
	module declares its path as: charm.land/glamour/v2
	        but was required as: github.com/charmbracelet/glamour/v2

### ⚠️ Artifact update problem Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens: - any of the package files in this branch needs updating, or - the branch becomes conflicted, or - you click the rebase/retry checkbox if found above, or - you rename this PR's title to start with "rebase!" to trigger it manually The artifact failure details are included below: ##### File name: go.sum ``` go: github.com/charmbracelet/glamour/v2@v2.0.1: parsing go.mod: module declares its path as: charm.land/glamour/v2 but was required as: github.com/charmbracelet/glamour/v2 ```
Some checks failed
CI / integration-1 (pull_request) Has been skipped
Required
Details
CI / e2e (pull_request) Has been skipped
Required
Details
renovate/artifacts Artifact file update failure
CI / integration (pull_request) Failing after 4m43s
Required
Details
CI / generate (pull_request) Failing after 33s
Required
Details
CI / build (pull_request) Failing after 33s
Required
Details
CI / lint (pull_request) Failing after 1m53s
Required
Details
CI / unit (pull_request) Failing after 1m24s
Required
Details
CI / ci (pull_request) Failing after 0s
Required
Details
Some required checks were not successful.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'renovate/github.com-charmbracelet-glamour-2.x:renovate/github.com-charmbracelet-glamour-2.x'
git switch 'renovate/github.com-charmbracelet-glamour-2.x'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
hmajid2301/optinix!10
No description provided.