1
0
Fork 0
forked from forgejo/forgejo

Update chroma (#18033)

Update chroma to 0.9.4

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2021-12-20 02:49:38 +00:00 committed by GitHub
parent fb5f7791ef
commit 25677cdc5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 937 additions and 683 deletions

View file

@ -0,0 +1,27 @@
package b
import (
. "github.com/alecthomas/chroma" // nolint
"github.com/alecthomas/chroma/lexers/internal"
)
// BashSession lexer.
var BashSession = internal.Register(MustNewLazyLexer(
&Config{
Name: "BashSession",
Aliases: []string{"bash-session", "console", "shell-session"},
Filenames: []string{".sh-session"},
MimeTypes: []string{"text/x-sh"},
EnsureNL: true,
},
bashsessionRules,
))
func bashsessionRules() Rules {
return Rules{
"root": {
{`(^[#$%>]\s*)(.*\n?)`, ByGroups(GenericPrompt, Using(Bash)), nil},
{`^.+\n?`, GenericOutput, nil},
},
}
}