mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a2a7bb620 | ||
|
|
f4718e24c8 |
+3
-104
@@ -2,64 +2,17 @@ package ansi
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"sync"
|
|
||||||
|
|
||||||
"github.com/alecthomas/chroma/v2"
|
|
||||||
"github.com/alecthomas/chroma/v2/quick"
|
|
||||||
"github.com/alecthomas/chroma/v2/styles"
|
|
||||||
"github.com/muesli/reflow/indent"
|
"github.com/muesli/reflow/indent"
|
||||||
"github.com/muesli/termenv"
|
rwansi "github.com/rwinkhart/go-highlite/ansi"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
|
||||||
// The chroma style theme name used for rendering.
|
|
||||||
chromaStyleTheme = "charm"
|
|
||||||
)
|
|
||||||
|
|
||||||
// mutex for synchronizing access to the chroma style registry.
|
|
||||||
// Related https://github.com/alecthomas/chroma/pull/650
|
|
||||||
var mutex = sync.Mutex{}
|
|
||||||
|
|
||||||
// A CodeBlockElement is used to render code blocks.
|
// A CodeBlockElement is used to render code blocks.
|
||||||
type CodeBlockElement struct {
|
type CodeBlockElement struct {
|
||||||
Code string
|
Code string
|
||||||
Language string
|
Language string
|
||||||
}
|
}
|
||||||
|
|
||||||
func chromaStyle(style StylePrimitive) string {
|
|
||||||
var s string
|
|
||||||
|
|
||||||
if style.Color != nil {
|
|
||||||
s = *style.Color
|
|
||||||
}
|
|
||||||
if style.BackgroundColor != nil {
|
|
||||||
if s != "" {
|
|
||||||
s += " "
|
|
||||||
}
|
|
||||||
s += "bg:" + *style.BackgroundColor
|
|
||||||
}
|
|
||||||
if style.Italic != nil && *style.Italic {
|
|
||||||
if s != "" {
|
|
||||||
s += " "
|
|
||||||
}
|
|
||||||
s += "italic"
|
|
||||||
}
|
|
||||||
if style.Bold != nil && *style.Bold {
|
|
||||||
if s != "" {
|
|
||||||
s += " "
|
|
||||||
}
|
|
||||||
s += "bold"
|
|
||||||
}
|
|
||||||
if style.Underline != nil && *style.Underline {
|
|
||||||
if s != "" {
|
|
||||||
s += " "
|
|
||||||
}
|
|
||||||
s += "underline"
|
|
||||||
}
|
|
||||||
|
|
||||||
return s
|
|
||||||
}
|
|
||||||
|
|
||||||
func (e *CodeBlockElement) Render(w io.Writer, ctx RenderContext) error {
|
func (e *CodeBlockElement) Render(w io.Writer, ctx RenderContext) error {
|
||||||
bs := ctx.blockStack
|
bs := ctx.blockStack
|
||||||
|
|
||||||
@@ -72,71 +25,17 @@ func (e *CodeBlockElement) Render(w io.Writer, ctx RenderContext) error {
|
|||||||
if rules.Margin != nil {
|
if rules.Margin != nil {
|
||||||
margin = *rules.Margin
|
margin = *rules.Margin
|
||||||
}
|
}
|
||||||
theme := rules.Theme
|
|
||||||
|
|
||||||
if rules.Chroma != nil && ctx.options.ColorProfile != termenv.Ascii {
|
|
||||||
theme = chromaStyleTheme
|
|
||||||
mutex.Lock()
|
|
||||||
// Don't register the style if it's already registered.
|
|
||||||
_, ok := styles.Registry[theme]
|
|
||||||
if !ok {
|
|
||||||
styles.Register(chroma.MustNewStyle(theme,
|
|
||||||
chroma.StyleEntries{
|
|
||||||
chroma.Text: chromaStyle(rules.Chroma.Text),
|
|
||||||
chroma.Error: chromaStyle(rules.Chroma.Error),
|
|
||||||
chroma.Comment: chromaStyle(rules.Chroma.Comment),
|
|
||||||
chroma.CommentPreproc: chromaStyle(rules.Chroma.CommentPreproc),
|
|
||||||
chroma.Keyword: chromaStyle(rules.Chroma.Keyword),
|
|
||||||
chroma.KeywordReserved: chromaStyle(rules.Chroma.KeywordReserved),
|
|
||||||
chroma.KeywordNamespace: chromaStyle(rules.Chroma.KeywordNamespace),
|
|
||||||
chroma.KeywordType: chromaStyle(rules.Chroma.KeywordType),
|
|
||||||
chroma.Operator: chromaStyle(rules.Chroma.Operator),
|
|
||||||
chroma.Punctuation: chromaStyle(rules.Chroma.Punctuation),
|
|
||||||
chroma.Name: chromaStyle(rules.Chroma.Name),
|
|
||||||
chroma.NameBuiltin: chromaStyle(rules.Chroma.NameBuiltin),
|
|
||||||
chroma.NameTag: chromaStyle(rules.Chroma.NameTag),
|
|
||||||
chroma.NameAttribute: chromaStyle(rules.Chroma.NameAttribute),
|
|
||||||
chroma.NameClass: chromaStyle(rules.Chroma.NameClass),
|
|
||||||
chroma.NameConstant: chromaStyle(rules.Chroma.NameConstant),
|
|
||||||
chroma.NameDecorator: chromaStyle(rules.Chroma.NameDecorator),
|
|
||||||
chroma.NameException: chromaStyle(rules.Chroma.NameException),
|
|
||||||
chroma.NameFunction: chromaStyle(rules.Chroma.NameFunction),
|
|
||||||
chroma.NameOther: chromaStyle(rules.Chroma.NameOther),
|
|
||||||
chroma.Literal: chromaStyle(rules.Chroma.Literal),
|
|
||||||
chroma.LiteralNumber: chromaStyle(rules.Chroma.LiteralNumber),
|
|
||||||
chroma.LiteralDate: chromaStyle(rules.Chroma.LiteralDate),
|
|
||||||
chroma.LiteralString: chromaStyle(rules.Chroma.LiteralString),
|
|
||||||
chroma.LiteralStringEscape: chromaStyle(rules.Chroma.LiteralStringEscape),
|
|
||||||
chroma.GenericDeleted: chromaStyle(rules.Chroma.GenericDeleted),
|
|
||||||
chroma.GenericEmph: chromaStyle(rules.Chroma.GenericEmph),
|
|
||||||
chroma.GenericInserted: chromaStyle(rules.Chroma.GenericInserted),
|
|
||||||
chroma.GenericStrong: chromaStyle(rules.Chroma.GenericStrong),
|
|
||||||
chroma.GenericSubheading: chromaStyle(rules.Chroma.GenericSubheading),
|
|
||||||
chroma.Background: chromaStyle(rules.Chroma.Background),
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
mutex.Unlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
iw := indent.NewWriterPipe(w, indentation+margin, func(wr io.Writer) {
|
iw := indent.NewWriterPipe(w, indentation+margin, func(wr io.Writer) {
|
||||||
renderText(w, ctx.options.ColorProfile, bs.Current().Style.StylePrimitive, " ")
|
renderText(w, ctx.options.ColorProfile, bs.Current().Style.StylePrimitive, " ")
|
||||||
})
|
})
|
||||||
|
|
||||||
if len(theme) > 0 {
|
|
||||||
renderText(iw, ctx.options.ColorProfile, bs.Current().Style.StylePrimitive, rules.BlockPrefix)
|
renderText(iw, ctx.options.ColorProfile, bs.Current().Style.StylePrimitive, rules.BlockPrefix)
|
||||||
err := quick.Highlight(iw, e.Code, e.Language, "terminal256", theme)
|
highightedCode, err := rwansi.Colorize(e.Code, e.Language, 171)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
iw.Write([]byte(highightedCode))
|
||||||
renderText(iw, ctx.options.ColorProfile, bs.Current().Style.StylePrimitive, rules.BlockSuffix)
|
renderText(iw, ctx.options.ColorProfile, bs.Current().Style.StylePrimitive, rules.BlockSuffix)
|
||||||
return nil
|
return nil
|
||||||
}
|
|
||||||
|
|
||||||
// fallback rendering
|
|
||||||
el := &BaseElement{
|
|
||||||
Token: e.Code,
|
|
||||||
Style: rules.StylePrimitive,
|
|
||||||
}
|
|
||||||
|
|
||||||
return el.Render(iw, ctx)
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +1,5 @@
|
|||||||
package ansi
|
package ansi
|
||||||
|
|
||||||
// Chroma holds all the chroma settings.
|
|
||||||
type Chroma struct {
|
|
||||||
Text StylePrimitive `json:"text,omitempty"`
|
|
||||||
Error StylePrimitive `json:"error,omitempty"`
|
|
||||||
Comment StylePrimitive `json:"comment,omitempty"`
|
|
||||||
CommentPreproc StylePrimitive `json:"comment_preproc,omitempty"`
|
|
||||||
Keyword StylePrimitive `json:"keyword,omitempty"`
|
|
||||||
KeywordReserved StylePrimitive `json:"keyword_reserved,omitempty"`
|
|
||||||
KeywordNamespace StylePrimitive `json:"keyword_namespace,omitempty"`
|
|
||||||
KeywordType StylePrimitive `json:"keyword_type,omitempty"`
|
|
||||||
Operator StylePrimitive `json:"operator,omitempty"`
|
|
||||||
Punctuation StylePrimitive `json:"punctuation,omitempty"`
|
|
||||||
Name StylePrimitive `json:"name,omitempty"`
|
|
||||||
NameBuiltin StylePrimitive `json:"name_builtin,omitempty"`
|
|
||||||
NameTag StylePrimitive `json:"name_tag,omitempty"`
|
|
||||||
NameAttribute StylePrimitive `json:"name_attribute,omitempty"`
|
|
||||||
NameClass StylePrimitive `json:"name_class,omitempty"`
|
|
||||||
NameConstant StylePrimitive `json:"name_constant,omitempty"`
|
|
||||||
NameDecorator StylePrimitive `json:"name_decorator,omitempty"`
|
|
||||||
NameException StylePrimitive `json:"name_exception,omitempty"`
|
|
||||||
NameFunction StylePrimitive `json:"name_function,omitempty"`
|
|
||||||
NameOther StylePrimitive `json:"name_other,omitempty"`
|
|
||||||
Literal StylePrimitive `json:"literal,omitempty"`
|
|
||||||
LiteralNumber StylePrimitive `json:"literal_number,omitempty"`
|
|
||||||
LiteralDate StylePrimitive `json:"literal_date,omitempty"`
|
|
||||||
LiteralString StylePrimitive `json:"literal_string,omitempty"`
|
|
||||||
LiteralStringEscape StylePrimitive `json:"literal_string_escape,omitempty"`
|
|
||||||
GenericDeleted StylePrimitive `json:"generic_deleted,omitempty"`
|
|
||||||
GenericEmph StylePrimitive `json:"generic_emph,omitempty"`
|
|
||||||
GenericInserted StylePrimitive `json:"generic_inserted,omitempty"`
|
|
||||||
GenericStrong StylePrimitive `json:"generic_strong,omitempty"`
|
|
||||||
GenericSubheading StylePrimitive `json:"generic_subheading,omitempty"`
|
|
||||||
Background StylePrimitive `json:"background,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// StylePrimitive holds all the basic style settings.
|
// StylePrimitive holds all the basic style settings.
|
||||||
type StylePrimitive struct {
|
type StylePrimitive struct {
|
||||||
BlockPrefix string `json:"block_prefix,omitempty"`
|
BlockPrefix string `json:"block_prefix,omitempty"`
|
||||||
@@ -76,8 +41,6 @@ type StyleBlock struct {
|
|||||||
// StyleCodeBlock holds the style settings for a code block.
|
// StyleCodeBlock holds the style settings for a code block.
|
||||||
type StyleCodeBlock struct {
|
type StyleCodeBlock struct {
|
||||||
StyleBlock
|
StyleBlock
|
||||||
Theme string `json:"theme,omitempty"`
|
|
||||||
Chroma *Chroma `json:"chroma,omitempty"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// StyleList holds the style settings for a list.
|
// StyleList holds the style settings for a list.
|
||||||
|
|||||||
-86
@@ -117,92 +117,6 @@ var DraculaStyleConfig = ansi.StyleConfig{
|
|||||||
},
|
},
|
||||||
Margin: uintPtr(defaultMargin),
|
Margin: uintPtr(defaultMargin),
|
||||||
},
|
},
|
||||||
Chroma: &ansi.Chroma{
|
|
||||||
Text: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#f8f8f2"),
|
|
||||||
},
|
|
||||||
Error: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#f8f8f2"),
|
|
||||||
BackgroundColor: stringPtr("#ff5555"),
|
|
||||||
},
|
|
||||||
Comment: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#6272A4"),
|
|
||||||
},
|
|
||||||
CommentPreproc: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ff79c6"),
|
|
||||||
},
|
|
||||||
Keyword: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ff79c6"),
|
|
||||||
},
|
|
||||||
KeywordReserved: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ff79c6"),
|
|
||||||
},
|
|
||||||
KeywordNamespace: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ff79c6"),
|
|
||||||
},
|
|
||||||
KeywordType: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#8be9fd"),
|
|
||||||
},
|
|
||||||
Operator: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ff79c6"),
|
|
||||||
},
|
|
||||||
Punctuation: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#f8f8f2"),
|
|
||||||
},
|
|
||||||
Name: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#8be9fd"),
|
|
||||||
},
|
|
||||||
NameBuiltin: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#8be9fd"),
|
|
||||||
},
|
|
||||||
NameTag: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ff79c6"),
|
|
||||||
},
|
|
||||||
NameAttribute: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#50fa7b"),
|
|
||||||
},
|
|
||||||
NameClass: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#8be9fd"),
|
|
||||||
},
|
|
||||||
NameConstant: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#bd93f9"),
|
|
||||||
},
|
|
||||||
NameDecorator: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#50fa7b"),
|
|
||||||
},
|
|
||||||
NameFunction: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#50fa7b"),
|
|
||||||
},
|
|
||||||
LiteralNumber: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#6EEFC0"),
|
|
||||||
},
|
|
||||||
LiteralString: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#f1fa8c"),
|
|
||||||
},
|
|
||||||
LiteralStringEscape: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ff79c6"),
|
|
||||||
},
|
|
||||||
GenericDeleted: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ff5555"),
|
|
||||||
},
|
|
||||||
GenericEmph: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#f1fa8c"),
|
|
||||||
Italic: boolPtr(true),
|
|
||||||
},
|
|
||||||
GenericInserted: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#50fa7b"),
|
|
||||||
},
|
|
||||||
GenericStrong: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#ffb86c"),
|
|
||||||
Bold: boolPtr(true),
|
|
||||||
},
|
|
||||||
GenericSubheading: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#bd93f9"),
|
|
||||||
},
|
|
||||||
Background: ansi.StylePrimitive{
|
|
||||||
BackgroundColor: stringPtr("#282a36"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Table: ansi.StyleTable{
|
Table: ansi.StyleTable{
|
||||||
StyleBlock: ansi.StyleBlock{
|
StyleBlock: ansi.StyleBlock{
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
module github.com/charmbracelet/glamour
|
module github.com/charmbracelet/glamour
|
||||||
|
|
||||||
go 1.17
|
go 1.24.4
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/alecthomas/chroma/v2 v2.8.0
|
github.com/microcosm-cc/bluemonday v1.0.27
|
||||||
github.com/microcosm-cc/bluemonday v1.0.25
|
|
||||||
github.com/muesli/reflow v0.3.0
|
github.com/muesli/reflow v0.3.0
|
||||||
github.com/muesli/termenv v0.15.2
|
github.com/muesli/termenv v0.16.0
|
||||||
github.com/olekukonko/tablewriter v0.0.5
|
github.com/olekukonko/tablewriter v0.0.5
|
||||||
github.com/yuin/goldmark v1.5.4
|
github.com/rwinkhart/go-highlite v0.1.0
|
||||||
github.com/yuin/goldmark-emoji v1.0.2
|
github.com/yuin/goldmark v1.7.12
|
||||||
|
github.com/yuin/goldmark-emoji v1.0.6
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
|
||||||
github.com/aymerick/douceur v0.2.0 // indirect
|
github.com/aymerick/douceur v0.2.0 // indirect
|
||||||
github.com/dlclark/regexp2 v1.4.0 // indirect
|
github.com/gorilla/css v1.0.1 // indirect
|
||||||
github.com/gorilla/css v1.0.0 // indirect
|
|
||||||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.18 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/mattn/go-runewidth v0.0.14 // indirect
|
github.com/mattn/go-runewidth v0.0.16 // indirect
|
||||||
github.com/rivo/uniseg v0.2.0 // indirect
|
github.com/rivo/uniseg v0.4.7 // indirect
|
||||||
golang.org/x/net v0.17.0 // indirect
|
golang.org/x/net v0.41.0 // indirect
|
||||||
golang.org/x/sys v0.13.0 // indirect
|
golang.org/x/sys v0.33.0 // indirect
|
||||||
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,88 +1,41 @@
|
|||||||
github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink=
|
|
||||||
github.com/alecthomas/assert/v2 v2.2.1/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ=
|
|
||||||
github.com/alecthomas/chroma/v2 v2.8.0 h1:w9WJUjFFmHHB2e8mRpL9jjy3alYDlU0QLDezj1xE264=
|
|
||||||
github.com/alecthomas/chroma/v2 v2.8.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw=
|
|
||||||
github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk=
|
|
||||||
github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
|
|
||||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
|
||||||
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
|
github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
|
||||||
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
|
github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
|
||||||
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
|
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
|
||||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8=
|
||||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0=
|
||||||
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
|
|
||||||
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
|
|
||||||
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
|
|
||||||
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
|
|
||||||
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=
|
||||||
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
|
||||||
github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98=
|
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||||
github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
|
||||||
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||||
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||||
github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU=
|
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
|
||||||
github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
|
||||||
github.com/microcosm-cc/bluemonday v1.0.25 h1:4NEwSfiJ+Wva0VxN5B8OwMicaJvD8r9tlJWm9rtloEg=
|
github.com/microcosm-cc/bluemonday v1.0.27 h1:MpEUotklkwCSLeH+Qdx1VJgNqLlpY2KXwXFM08ygZfk=
|
||||||
github.com/microcosm-cc/bluemonday v1.0.25/go.mod h1:ZIOjCQp1OrzBBPIJmfX4qDYFuhU02nx4bn030ixfHLE=
|
github.com/microcosm-cc/bluemonday v1.0.27/go.mod h1:jFi9vgW+H7c3V0lb6nR74Ib/DIB5OBs92Dimizgw2cA=
|
||||||
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
|
github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s=
|
||||||
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
|
github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8=
|
||||||
github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo=
|
github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=
|
||||||
github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8=
|
github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=
|
||||||
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
|
||||||
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
|
||||||
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
|
||||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||||
github.com/yuin/goldmark v1.3.7/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
|
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
|
||||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
|
||||||
github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU=
|
github.com/rwinkhart/go-highlite v0.1.0 h1:ylH+cn/M+Y7rnQxBkqI41WaYXPMR9YmWSYVFwZj7J1c=
|
||||||
github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
github.com/rwinkhart/go-highlite v0.1.0/go.mod h1:mWLMtCWcyV0BG4NeyPyAUGMjPvI0ds6vXmUq89QwBFA=
|
||||||
github.com/yuin/goldmark-emoji v1.0.2 h1:c/RgTShNgHTtc6xdz2KKI74jJr6rWi7FPgnP9GAsO5s=
|
github.com/yuin/goldmark v1.7.12 h1:YwGP/rrea2/CnCtUHgjuolG/PnMxdQtPMO5PvaE2/nY=
|
||||||
github.com/yuin/goldmark-emoji v1.0.2/go.mod h1:RhP/RWpexdp+KHs7ghKnifRoIs/Bq4nDS7tRbCkOwKY=
|
github.com/yuin/goldmark v1.7.12/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
github.com/yuin/goldmark-emoji v1.0.6 h1:QWfF2FYaXwL74tfGOW5izeiZepUDroDJfWubQI9HTHs=
|
||||||
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
github.com/yuin/goldmark-emoji v1.0.6/go.mod h1:ukxJDKFpdFb5x0a5HqbdlcKtebh086iJpI31LTKmWuA=
|
||||||
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
|
||||||
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
|
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
|
||||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
|
|
||||||
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
|
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
|
||||||
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
|
|
||||||
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
|
|
||||||
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
|
||||||
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
|
|
||||||
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
|
||||||
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||||
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||||
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
|
||||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
|
||||||
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
|
|
||||||
golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o=
|
|
||||||
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
|
||||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
|
||||||
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
|
|
||||||
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
|
||||||
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
|
|
||||||
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
|
|||||||
@@ -234,89 +234,6 @@ var (
|
|||||||
},
|
},
|
||||||
Margin: uintPtr(defaultMargin),
|
Margin: uintPtr(defaultMargin),
|
||||||
},
|
},
|
||||||
Chroma: &ansi.Chroma{
|
|
||||||
Text: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#C4C4C4"),
|
|
||||||
},
|
|
||||||
Error: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#F1F1F1"),
|
|
||||||
BackgroundColor: stringPtr("#F05B5B"),
|
|
||||||
},
|
|
||||||
Comment: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#676767"),
|
|
||||||
},
|
|
||||||
CommentPreproc: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FF875F"),
|
|
||||||
},
|
|
||||||
Keyword: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#00AAFF"),
|
|
||||||
},
|
|
||||||
KeywordReserved: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FF5FD2"),
|
|
||||||
},
|
|
||||||
KeywordNamespace: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FF5F87"),
|
|
||||||
},
|
|
||||||
KeywordType: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#6E6ED8"),
|
|
||||||
},
|
|
||||||
Operator: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#EF8080"),
|
|
||||||
},
|
|
||||||
Punctuation: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#E8E8A8"),
|
|
||||||
},
|
|
||||||
Name: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#C4C4C4"),
|
|
||||||
},
|
|
||||||
NameBuiltin: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FF8EC7"),
|
|
||||||
},
|
|
||||||
NameTag: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#B083EA"),
|
|
||||||
},
|
|
||||||
NameAttribute: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#7A7AE6"),
|
|
||||||
},
|
|
||||||
NameClass: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#F1F1F1"),
|
|
||||||
Underline: boolPtr(true),
|
|
||||||
Bold: boolPtr(true),
|
|
||||||
},
|
|
||||||
NameDecorator: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FFFF87"),
|
|
||||||
},
|
|
||||||
NameFunction: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#00D787"),
|
|
||||||
},
|
|
||||||
LiteralNumber: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#6EEFC0"),
|
|
||||||
},
|
|
||||||
LiteralString: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#C69669"),
|
|
||||||
},
|
|
||||||
LiteralStringEscape: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#AFFFD7"),
|
|
||||||
},
|
|
||||||
GenericDeleted: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FD5B5B"),
|
|
||||||
},
|
|
||||||
GenericEmph: ansi.StylePrimitive{
|
|
||||||
Italic: boolPtr(true),
|
|
||||||
},
|
|
||||||
GenericInserted: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#00D787"),
|
|
||||||
},
|
|
||||||
GenericStrong: ansi.StylePrimitive{
|
|
||||||
Bold: boolPtr(true),
|
|
||||||
},
|
|
||||||
GenericSubheading: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#777777"),
|
|
||||||
},
|
|
||||||
Background: ansi.StylePrimitive{
|
|
||||||
BackgroundColor: stringPtr("#373737"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Table: ansi.StyleTable{
|
Table: ansi.StyleTable{
|
||||||
StyleBlock: ansi.StyleBlock{
|
StyleBlock: ansi.StyleBlock{
|
||||||
@@ -446,89 +363,6 @@ var (
|
|||||||
},
|
},
|
||||||
Margin: uintPtr(defaultMargin),
|
Margin: uintPtr(defaultMargin),
|
||||||
},
|
},
|
||||||
Chroma: &ansi.Chroma{
|
|
||||||
Text: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#2A2A2A"),
|
|
||||||
},
|
|
||||||
Error: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#F1F1F1"),
|
|
||||||
BackgroundColor: stringPtr("#FF5555"),
|
|
||||||
},
|
|
||||||
Comment: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#8D8D8D"),
|
|
||||||
},
|
|
||||||
CommentPreproc: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FF875F"),
|
|
||||||
},
|
|
||||||
Keyword: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#279EFC"),
|
|
||||||
},
|
|
||||||
KeywordReserved: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FF5FD2"),
|
|
||||||
},
|
|
||||||
KeywordNamespace: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FB406F"),
|
|
||||||
},
|
|
||||||
KeywordType: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#7049C2"),
|
|
||||||
},
|
|
||||||
Operator: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FF2626"),
|
|
||||||
},
|
|
||||||
Punctuation: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FA7878"),
|
|
||||||
},
|
|
||||||
NameBuiltin: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#0A1BB1"),
|
|
||||||
},
|
|
||||||
NameTag: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#581290"),
|
|
||||||
},
|
|
||||||
NameAttribute: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#8362CB"),
|
|
||||||
},
|
|
||||||
NameClass: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#212121"),
|
|
||||||
Underline: boolPtr(true),
|
|
||||||
Bold: boolPtr(true),
|
|
||||||
},
|
|
||||||
NameConstant: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#581290"),
|
|
||||||
},
|
|
||||||
NameDecorator: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#A3A322"),
|
|
||||||
},
|
|
||||||
NameFunction: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#019F57"),
|
|
||||||
},
|
|
||||||
LiteralNumber: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#22CCAE"),
|
|
||||||
},
|
|
||||||
LiteralString: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#7E5B38"),
|
|
||||||
},
|
|
||||||
LiteralStringEscape: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#00AEAE"),
|
|
||||||
},
|
|
||||||
GenericDeleted: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#FD5B5B"),
|
|
||||||
},
|
|
||||||
GenericEmph: ansi.StylePrimitive{
|
|
||||||
Italic: boolPtr(true),
|
|
||||||
},
|
|
||||||
GenericInserted: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#00D787"),
|
|
||||||
},
|
|
||||||
GenericStrong: ansi.StylePrimitive{
|
|
||||||
Bold: boolPtr(true),
|
|
||||||
},
|
|
||||||
GenericSubheading: ansi.StylePrimitive{
|
|
||||||
Color: stringPtr("#777777"),
|
|
||||||
},
|
|
||||||
Background: ansi.StylePrimitive{
|
|
||||||
BackgroundColor: stringPtr("#373737"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
Table: ansi.StyleTable{
|
Table: ansi.StyleTable{
|
||||||
StyleBlock: ansi.StyleBlock{
|
StyleBlock: ansi.StyleBlock{
|
||||||
|
|||||||
+1
-8
@@ -175,20 +175,13 @@ Style:
|
|||||||
|
|
||||||
The `code_block` element represents a block of code.
|
The `code_block` element represents a block of code.
|
||||||
|
|
||||||
| Attribute | Value | Description |
|
|
||||||
| --------- | ------ | --------------------------------------------------------------- |
|
|
||||||
| theme | string | Defines the [Chroma][chroma] theme used for syntax highlighting |
|
|
||||||
|
|
||||||
[chroma]: https://github.com/alecthomas/chroma
|
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
|
|
||||||
Style:
|
Style:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
"code_block": {
|
"code_block": {
|
||||||
"color": "200",
|
"color": "200"
|
||||||
"theme": "solarized-dark"
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+1
-89
@@ -90,95 +90,7 @@
|
|||||||
},
|
},
|
||||||
"code_block": {
|
"code_block": {
|
||||||
"color": "244",
|
"color": "244",
|
||||||
"margin": 2,
|
"margin": 2
|
||||||
"chroma": {
|
|
||||||
"text": {
|
|
||||||
"color": "#C4C4C4"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"color": "#F1F1F1",
|
|
||||||
"background_color": "#F05B5B"
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#676767"
|
|
||||||
},
|
|
||||||
"comment_preproc": {
|
|
||||||
"color": "#FF875F"
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#00AAFF"
|
|
||||||
},
|
|
||||||
"keyword_reserved": {
|
|
||||||
"color": "#FF5FD2"
|
|
||||||
},
|
|
||||||
"keyword_namespace": {
|
|
||||||
"color": "#FF5F87"
|
|
||||||
},
|
|
||||||
"keyword_type": {
|
|
||||||
"color": "#6E6ED8"
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#EF8080"
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#E8E8A8"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"color": "#C4C4C4"
|
|
||||||
},
|
|
||||||
"name_builtin": {
|
|
||||||
"color": "#FF8EC7"
|
|
||||||
},
|
|
||||||
"name_tag": {
|
|
||||||
"color": "#B083EA"
|
|
||||||
},
|
|
||||||
"name_attribute": {
|
|
||||||
"color": "#7A7AE6"
|
|
||||||
},
|
|
||||||
"name_class": {
|
|
||||||
"color": "#F1F1F1",
|
|
||||||
"underline": true,
|
|
||||||
"bold": true
|
|
||||||
},
|
|
||||||
"name_constant": {},
|
|
||||||
"name_decorator": {
|
|
||||||
"color": "#FFFF87"
|
|
||||||
},
|
|
||||||
"name_exception": {},
|
|
||||||
"name_function": {
|
|
||||||
"color": "#00D787"
|
|
||||||
},
|
|
||||||
"name_other": {},
|
|
||||||
"literal": {},
|
|
||||||
"literal_number": {
|
|
||||||
"color": "#6EEFC0"
|
|
||||||
},
|
|
||||||
"literal_date": {},
|
|
||||||
"literal_string": {
|
|
||||||
"color": "#C69669"
|
|
||||||
},
|
|
||||||
"literal_string_escape": {
|
|
||||||
"color": "#AFFFD7"
|
|
||||||
},
|
|
||||||
"generic_deleted": {
|
|
||||||
"color": "#FD5B5B"
|
|
||||||
},
|
|
||||||
"generic_emph": {
|
|
||||||
"italic": true
|
|
||||||
},
|
|
||||||
"generic_inserted": {
|
|
||||||
"color": "#00D787"
|
|
||||||
},
|
|
||||||
"generic_strong": {
|
|
||||||
"bold": true
|
|
||||||
},
|
|
||||||
"generic_subheading": {
|
|
||||||
"color": "#777777"
|
|
||||||
},
|
|
||||||
"background": {
|
|
||||||
"background_color": "#373737"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
"center_separator": "┼",
|
"center_separator": "┼",
|
||||||
|
|||||||
+1
-91
@@ -85,97 +85,7 @@
|
|||||||
},
|
},
|
||||||
"code_block": {
|
"code_block": {
|
||||||
"color": "#ffb86c",
|
"color": "#ffb86c",
|
||||||
"margin": 2,
|
"margin": 2
|
||||||
"chroma": {
|
|
||||||
"text": {
|
|
||||||
"color": "#f8f8f2"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"color": "#f8f8f2",
|
|
||||||
"background_color": "#ff5555"
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#6272A4"
|
|
||||||
},
|
|
||||||
"comment_preproc": {
|
|
||||||
"color": "#ff79c6"
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#ff79c6"
|
|
||||||
},
|
|
||||||
"keyword_reserved": {
|
|
||||||
"color": "#ff79c6"
|
|
||||||
},
|
|
||||||
"keyword_namespace": {
|
|
||||||
"color": "#ff79c6"
|
|
||||||
},
|
|
||||||
"keyword_type": {
|
|
||||||
"color": "#8be9fd"
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#ff79c6"
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#f8f8f2"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"color": "#8be9fd"
|
|
||||||
},
|
|
||||||
"name_builtin": {
|
|
||||||
"color": "#8be9fd"
|
|
||||||
},
|
|
||||||
"name_tag": {
|
|
||||||
"color": "#ff79c6"
|
|
||||||
},
|
|
||||||
"name_attribute": {
|
|
||||||
"color": "#50fa7b"
|
|
||||||
},
|
|
||||||
"name_class": {
|
|
||||||
"color": "#8be9fd"
|
|
||||||
},
|
|
||||||
"name_constant": {
|
|
||||||
"color": "#bd93f9"
|
|
||||||
},
|
|
||||||
"name_decorator": {
|
|
||||||
"color": "#50fa7b"
|
|
||||||
},
|
|
||||||
"name_exception": {},
|
|
||||||
"name_function": {
|
|
||||||
"color": "#50fa7b"
|
|
||||||
},
|
|
||||||
"name_other": {},
|
|
||||||
"literal": {},
|
|
||||||
"literal_number": {
|
|
||||||
"color": "#6EEFC0"
|
|
||||||
},
|
|
||||||
"literal_date": {},
|
|
||||||
"literal_string": {
|
|
||||||
"color": "#f1fa8c"
|
|
||||||
},
|
|
||||||
"literal_string_escape": {
|
|
||||||
"color": "#ff79c6"
|
|
||||||
},
|
|
||||||
"generic_deleted": {
|
|
||||||
"color": "#ff5555"
|
|
||||||
},
|
|
||||||
"generic_emph": {
|
|
||||||
"color": "#f1fa8c",
|
|
||||||
"italic": true
|
|
||||||
},
|
|
||||||
"generic_inserted": {
|
|
||||||
"color": "#50fa7b"
|
|
||||||
},
|
|
||||||
"generic_strong": {
|
|
||||||
"color": "#ffb86c",
|
|
||||||
"bold": true
|
|
||||||
},
|
|
||||||
"generic_subheading": {
|
|
||||||
"color": "#bd93f9"
|
|
||||||
},
|
|
||||||
"background": {
|
|
||||||
"background_color": "#282a36"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
"center_separator": "┼",
|
"center_separator": "┼",
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"code_block": {
|
"code_block": {
|
||||||
"color": "200",
|
"color": "200"
|
||||||
"theme": "solarized-dark"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-89
@@ -89,95 +89,7 @@
|
|||||||
},
|
},
|
||||||
"code_block": {
|
"code_block": {
|
||||||
"color": "242",
|
"color": "242",
|
||||||
"margin": 2,
|
"margin": 2
|
||||||
"chroma": {
|
|
||||||
"text": {
|
|
||||||
"color": "#2A2A2A"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"color": "#F1F1F1",
|
|
||||||
"background_color": "#FF5555"
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#8D8D8D"
|
|
||||||
},
|
|
||||||
"comment_preproc": {
|
|
||||||
"color": "#FF875F"
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#279EFC"
|
|
||||||
},
|
|
||||||
"keyword_reserved": {
|
|
||||||
"color": "#FF5FD2"
|
|
||||||
},
|
|
||||||
"keyword_namespace": {
|
|
||||||
"color": "#FB406F"
|
|
||||||
},
|
|
||||||
"keyword_type": {
|
|
||||||
"color": "#7049C2"
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#FF2626"
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#FA7878"
|
|
||||||
},
|
|
||||||
"name": {},
|
|
||||||
"name_builtin": {
|
|
||||||
"color": "#0A1BB1"
|
|
||||||
},
|
|
||||||
"name_tag": {
|
|
||||||
"color": "#581290"
|
|
||||||
},
|
|
||||||
"name_attribute": {
|
|
||||||
"color": "#8362CB"
|
|
||||||
},
|
|
||||||
"name_class": {
|
|
||||||
"color": "#212121",
|
|
||||||
"underline": true,
|
|
||||||
"bold": true
|
|
||||||
},
|
|
||||||
"name_constant": {
|
|
||||||
"color": "#581290"
|
|
||||||
},
|
|
||||||
"name_decorator": {
|
|
||||||
"color": "#A3A322"
|
|
||||||
},
|
|
||||||
"name_exception": {},
|
|
||||||
"name_function": {
|
|
||||||
"color": "#019F57"
|
|
||||||
},
|
|
||||||
"name_other": {},
|
|
||||||
"literal": {},
|
|
||||||
"literal_number": {
|
|
||||||
"color": "#22CCAE"
|
|
||||||
},
|
|
||||||
"literal_date": {},
|
|
||||||
"literal_string": {
|
|
||||||
"color": "#7E5B38"
|
|
||||||
},
|
|
||||||
"literal_string_escape": {
|
|
||||||
"color": "#00AEAE"
|
|
||||||
},
|
|
||||||
"generic_deleted": {
|
|
||||||
"color": "#FD5B5B"
|
|
||||||
},
|
|
||||||
"generic_emph": {
|
|
||||||
"italic": true
|
|
||||||
},
|
|
||||||
"generic_inserted": {
|
|
||||||
"color": "#00D787"
|
|
||||||
},
|
|
||||||
"generic_strong": {
|
|
||||||
"bold": true
|
|
||||||
},
|
|
||||||
"generic_subheading": {
|
|
||||||
"color": "#777777"
|
|
||||||
},
|
|
||||||
"background": {
|
|
||||||
"background_color": "#373737"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
"center_separator": "┼",
|
"center_separator": "┼",
|
||||||
|
|||||||
Vendored
+1
-89
@@ -78,95 +78,7 @@
|
|||||||
},
|
},
|
||||||
"code_block": {
|
"code_block": {
|
||||||
"color": "244",
|
"color": "244",
|
||||||
"margin": 2,
|
"margin": 2
|
||||||
"chroma": {
|
|
||||||
"text": {
|
|
||||||
"color": "#C4C4C4"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"color": "#F1F1F1",
|
|
||||||
"background_color": "#F05B5B"
|
|
||||||
},
|
|
||||||
"comment": {
|
|
||||||
"color": "#676767"
|
|
||||||
},
|
|
||||||
"comment_preproc": {
|
|
||||||
"color": "#FF875F"
|
|
||||||
},
|
|
||||||
"keyword": {
|
|
||||||
"color": "#00AAFF"
|
|
||||||
},
|
|
||||||
"keyword_reserved": {
|
|
||||||
"color": "#FF5FD2"
|
|
||||||
},
|
|
||||||
"keyword_namespace": {
|
|
||||||
"color": "#FF5F87"
|
|
||||||
},
|
|
||||||
"keyword_type": {
|
|
||||||
"color": "#6E6ED8"
|
|
||||||
},
|
|
||||||
"operator": {
|
|
||||||
"color": "#EF8080"
|
|
||||||
},
|
|
||||||
"punctuation": {
|
|
||||||
"color": "#E8E8A8"
|
|
||||||
},
|
|
||||||
"name": {
|
|
||||||
"color": "#C4C4C4"
|
|
||||||
},
|
|
||||||
"name_builtin": {
|
|
||||||
"color": "#FF8EC7"
|
|
||||||
},
|
|
||||||
"name_tag": {
|
|
||||||
"color": "#B083EA"
|
|
||||||
},
|
|
||||||
"name_attribute": {
|
|
||||||
"color": "#7A7AE6"
|
|
||||||
},
|
|
||||||
"name_class": {
|
|
||||||
"color": "#F1F1F1",
|
|
||||||
"underline": true,
|
|
||||||
"bold": true
|
|
||||||
},
|
|
||||||
"name_constant": {},
|
|
||||||
"name_decorator": {
|
|
||||||
"color": "#FFFF87"
|
|
||||||
},
|
|
||||||
"name_exception": {},
|
|
||||||
"name_function": {
|
|
||||||
"color": "#00D787"
|
|
||||||
},
|
|
||||||
"name_other": {},
|
|
||||||
"literal": {},
|
|
||||||
"literal_number": {
|
|
||||||
"color": "#6EEFC0"
|
|
||||||
},
|
|
||||||
"literal_date": {},
|
|
||||||
"literal_string": {
|
|
||||||
"color": "#C69669"
|
|
||||||
},
|
|
||||||
"literal_string_escape": {
|
|
||||||
"color": "#AFFFD7"
|
|
||||||
},
|
|
||||||
"generic_deleted": {
|
|
||||||
"color": "#FD5B5B"
|
|
||||||
},
|
|
||||||
"generic_emph": {
|
|
||||||
"italic": true
|
|
||||||
},
|
|
||||||
"generic_inserted": {
|
|
||||||
"color": "#00D787"
|
|
||||||
},
|
|
||||||
"generic_strong": {
|
|
||||||
"bold": true
|
|
||||||
},
|
|
||||||
"generic_subheading": {
|
|
||||||
"color": "#777777"
|
|
||||||
},
|
|
||||||
"background": {
|
|
||||||
"background_color": "#373737"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"table": {
|
"table": {
|
||||||
"center_separator": "┼",
|
"center_separator": "┼",
|
||||||
|
|||||||
Reference in New Issue
Block a user