Skip to content
Myr

docs: use styled glamour markdown within viewport

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Maas Lalani · committed by Christian Rocha · parent e9fe942 · Browse files · 1 file+6 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−4 removed

  • other:+6 added−4 removed

1 file+6 added−4 removed

modified:examples/glamour/main.go+6 added-4 removed
9 unmodified lines
10 "github.com/charmbracelet/lipgloss"11)1213const content = `14Today’s Menu14# Today’s Menu1516## Appetizers1718| Name | Price | Notes |19| --- | --- | --- |20| Tsukemono | $2 | Just an appetizer |21| Tomato Soup | $4 | Made with San Marzano tomatoes |22| Okonomiyaki | $4 | Takes a few minutes to make |23| Curry | $3 | We can add squash if you’d like |2423Seasonal Dishes25## Seasonal Dishes2627| Name | Price | Notes |28| --- | --- | --- |29| Steamed bitter melon | $2 | Not so bitter |30| Takoyaki | $3 | Fun to eat |31| Winter squash | $3 | Today it's pumpkin |3231Desserts33## Desserts3435| Name | Price | Notes |36| --- | --- | --- |37| Dorayaki | $4 | Looks good on rabbits |
27 unmodified lines
65 BorderForeground(lipgloss.Color("62")).66 PaddingRight(2)6768 renderer, err := glamour.NewTermRenderer(67 glamour.WithStylePath("notty"),69 glamour.WithAutoStyle(),70 glamour.WithWordWrap(width),71 )72 if err != nil {73 return nil, err
54 unmodified lines