Fastfix for previous two commits (sorry) and chroma update.

Well, doing "git add ." not from repository's root is a bad idea.

Updated chroma dependency, added more languages to syntax highlighting.
This commit is contained in:
2019-03-07 08:43:28 +05:00
parent 3fe51fc6c5
commit 19b5ef3d9f
155 changed files with 6765 additions and 258 deletions

View File

@@ -61,7 +61,7 @@ var Restructuredtext = internal.Register(MustNewLexer(
func rstCodeBlock(groups []string, lexer Lexer) Iterator {
iterators := []Iterator{}
tokens := []*Token{
tokens := []Token{
{Punctuation, groups[1]},
{Text, groups[2]},
{OperatorWord, groups[3]},
@@ -73,7 +73,7 @@ func rstCodeBlock(groups []string, lexer Lexer) Iterator {
code := strings.Join(groups[8:], "")
lexer = internal.Get(groups[6])
if lexer == nil {
tokens = append(tokens, &Token{String, code})
tokens = append(tokens, Token{String, code})
iterators = append(iterators, Literator(tokens...))
} else {
sub, err := lexer.Tokenise(nil, code)

View File

@@ -12,6 +12,7 @@ var Rust = internal.Register(MustNewLexer(
Aliases: []string{"rust"},
Filenames: []string{"*.rs", "*.rs.in"},
MimeTypes: []string{"text/rust"},
EnsureNL: true,
},
Rules{
"root": {