diff options
| author | Tanner Prynn <tanner.prynn@nccgroup.trust> | 2016-02-22 16:34:46 -0600 |
|---|---|---|
| committer | Tanner Prynn <tanner.prynn@nccgroup.trust> | 2016-02-22 16:34:46 -0600 |
| commit | 604256ba5bdd0e7d707201d119db7035f478234d (patch) | |
| tree | 6be8e1133ef5599b592096ebc876e99d6dd13182 /doc/docs/cmdline.rst | |
| parent | 8d5dcbc8b124d7c12ca7f5c6e47bc899c848cd6b (diff) | |
| download | pygments-git-604256ba5bdd0e7d707201d119db7035f478234d.tar.gz | |
Add api, command line, etc. documentation for custom lexer/formatter loading
Diffstat (limited to 'doc/docs/cmdline.rst')
| -rw-r--r-- | doc/docs/cmdline.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/docs/cmdline.rst b/doc/docs/cmdline.rst index 165af969..8fcd3c8c 100644 --- a/doc/docs/cmdline.rst +++ b/doc/docs/cmdline.rst @@ -99,6 +99,19 @@ The ``-N`` option guesses a lexer name for a given filename, so that :: will print out ``python``. It won't highlight anything yet. If no specific lexer is known for that filename, ``text`` is printed. +Custom Lexers and Formatters +---------------------------- + +.. versionadded:: ? + +The ``--load-from-file`` flag enables custom lexers and formatters to be loaded +from files relative to the current directory. Create a file with a class named +CustomLexer or CustomFormatter, then specify it on the command line:: + + $ pygmentize -l your_lexer.py -f your_formatter.py --load-from-file + +For more information, see :doc:`the Pygments documentation on Lexer development +<lexerdevelopment>`. Getting help ------------ |
