From 04782e0678947eeb8db3b8a48dd19ccaa1a78466 Mon Sep 17 00:00:00 2001 From: Alec Thomas Date: Tue, 19 Sep 2017 11:20:43 +1000 Subject: [PATCH] Add doc.go. --- README.md | 8 ++++---- doc.go | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 doc.go diff --git a/README.md b/README.md index 992b59c..db7305f 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/doc.go b/doc.go new file mode 100644 index 0000000..ec90615 --- /dev/null +++ b/doc.go @@ -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