1
0
mirror of https://github.com/go-task/task.git synced 2025-06-23 00:38:19 +02:00

chore: add linter mirror (#2060)

This commit is contained in:
Oleksandr Redko
2025-02-24 14:06:54 +02:00
committed by GitHub
parent fb631902ce
commit a266fba93e
3 changed files with 5 additions and 4 deletions

View File

@ -59,7 +59,7 @@ func NewSnippet(b []byte, opts ...SnippetOption) *Snippet {
// Syntax highlight the input and split it into lines
buf := &bytes.Buffer{}
if err := quick.Highlight(buf, string(b), "yaml", "terminal", "task"); err != nil {
buf.WriteString(string(b))
buf.Write(b)
}
linesRaw := strings.Split(string(b), "\n")
linesHighlighted := strings.Split(buf.String(), "\n")