mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 16:37:19 -04:00
Keep errors lowercase
This commit is contained in:
+2
-2
@@ -22,7 +22,7 @@ type BaseElement struct {
|
|||||||
|
|
||||||
func color(c *string) (uint8, error) {
|
func color(c *string) (uint8, error) {
|
||||||
if c == nil || len(*c) == 0 {
|
if c == nil || len(*c) == 0 {
|
||||||
return 0, errors.New("Invalid color")
|
return 0, errors.New("invalid color")
|
||||||
}
|
}
|
||||||
if (*c)[0] == '#' {
|
if (*c)[0] == '#' {
|
||||||
i, err := hexToANSIColor(*c)
|
i, err := hexToANSIColor(*c)
|
||||||
@@ -61,7 +61,7 @@ func colorSeq(fg *string, bg *string) (string, error) {
|
|||||||
return seq + bs + "m", nil
|
return seq + bs + "m", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return "", errors.New("Invalid color")
|
return "", errors.New("invalid color")
|
||||||
}
|
}
|
||||||
|
|
||||||
func formatToken(format string, token string) (string, error) {
|
func formatToken(format string, token string) (string, error) {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ type ItemElement struct {
|
|||||||
func (e *ItemElement) Render(w io.Writer, ctx RenderContext) error {
|
func (e *ItemElement) Render(w io.Writer, ctx RenderContext) error {
|
||||||
var el *BaseElement
|
var el *BaseElement
|
||||||
if e.Enumeration > 0 {
|
if e.Enumeration > 0 {
|
||||||
|
|
||||||
el = &BaseElement{
|
el = &BaseElement{
|
||||||
Token: e.Text,
|
Token: e.Text,
|
||||||
Style: ctx.style[Enumeration],
|
Style: ctx.style[Enumeration],
|
||||||
|
|||||||
Reference in New Issue
Block a user