1
0
mirror of https://github.com/alecthomas/chroma.git synced 2025-03-17 20:58:08 +02:00

Add doc.go.

This commit is contained in:
Alec Thomas 2017-09-19 11:20:43 +10:00
parent c259129e64
commit 04782e0678
2 changed files with 11 additions and 4 deletions

View File

@ -43,10 +43,10 @@ Lexers convert source text into a stream of tokens, styles specify how token
types are mapped to colours, and formatters convert tokens and styles into
formatted output.
A package exists for each of these, with a global `Registry` variable
containing all of the registered implementations. There are also helper
functions for using the registry in each package, such as looking up lexers by
name or matching filenames, etc.
A package exists for each of these, containing a global `Registry` variable
with all of the registered implementations. There are also helper functions
for using the registry in each package, such as looking up lexers by name or
matching filenames, etc.
In all cases, if a lexer, formatter or style can not be determined, `nil` will
be returned. In this situation you may want to default to the `Fallback`

7
doc.go Normal file
View File

@ -0,0 +1,7 @@
// Package chroma takes source code and other structured text and converts it into syntax highlighted HTML, ANSI-
// coloured text, etc.
//
// Chroma is based heavily on Pygments, and includes translaters for Pygments lexers and styles.
//
// For more information, go here: https://github.com/alecthomas/chroma
package chroma