summaryrefslogtreecommitdiff
path: root/pygments/util.py
Commit message (Collapse)AuthorAgeFilesLines
* Overhaul encoding handling in cmdline even more.Georg Brandl2014-10-081-5/+30
| | | | | | | Now the encoding guessed for the input file will be used for an output file. We now always read and write to the terminal .buffer on Python 3, which allows us to override the terminal encoding and use our guessing algorithm.
* PEP8 and docstring format cleanup.Georg Brandl2014-10-071-25/+11
|
* Closes #979: improve encoding behavior of cmdline invocationsGeorg Brandl2014-10-071-0/+21
| | | | | | | | Now the preferred locale encoding is used for stdin/stdout if the encoding is not set on the file objects. Also, code from input files is tried to be decoded as UTF-8, the locale encoding and finally latin-1 as a last resort if no encoding option is given.
* Move specialcasing of words() to any subclass of FutureTim Hatch2014-10-031-0/+12
| | | | | | The idea here is that plugins might want to provide some other optimization we haven't dreamed up yet, and to do so this way means they don't need to change with RegexLexerMeta (and it will be easier to support in regexlint).
* Make format_lines take an indent level.Tim Hatch2014-10-031-6/+7
| | | | | We need this because the vim keywords file uses functions to define these lists, because of Jython.
* Add util function for keyword list formattingTim Hatch2014-10-031-0/+20
|
* Update ElixirLexer and example_elixir.exAlexei Sholik2014-06-051-0/+291
Elixir syntax has evolved quite significantly since the initial lexer was written. In this update I have rewritten most of the code to support modern Elixir (as of v0.14.0-dev). The example file has also been updated to give an quick overview of most of the language constructs.