Permalink
Browse files

Merge pull request #61 from tmm1/pygments16

Bump to latest pygments upstream
  • Loading branch information...
2 parents 257c870 + b3fe04d commit f2a45b72c8a5f3119ded1b813d882e2f3f1d992e @tnm tnm committed Feb 25, 2013
Showing with 8,423 additions and 1,413 deletions.
  1. +9 −0 CHANGELOG
  2. +14 −1 vendor/pygments-main/AUTHORS
  3. +56 −6 vendor/pygments-main/CHANGES
  4. +1 −1 vendor/pygments-main/LICENSE
  5. +1 −1 vendor/pygments-main/Makefile
  6. +1 −0 vendor/pygments-main/REVISION
  7. +1 −1 vendor/pygments-main/docs/generate.py
  8. +1 −1 vendor/pygments-main/docs/src/api.txt
  9. +1 −1 vendor/pygments-main/docs/src/index.txt
  10. +5 −0 vendor/pygments-main/docs/src/integrate.txt
  11. +70 −0 vendor/pygments-main/docs/src/java.txt
  12. +64 −0 vendor/pygments-main/external/autopygmentize
  13. +2 −2 vendor/pygments-main/external/markdown-processor.py
  14. +1 −1 vendor/pygments-main/external/moin-parser.py
  15. +1 −1 vendor/pygments-main/external/rst-directive-old.py
  16. +1 −1 vendor/pygments-main/external/rst-directive.py
  17. +2 −2 vendor/pygments-main/pygments/__init__.py
  18. +14 −6 vendor/pygments-main/pygments/cmdline.py
  19. +1 −1 vendor/pygments-main/pygments/console.py
  20. +1 −1 vendor/pygments-main/pygments/filter.py
  21. +1 −1 vendor/pygments-main/pygments/filters/__init__.py
  22. +1 −1 vendor/pygments-main/pygments/formatter.py
  23. +1 −1 vendor/pygments-main/pygments/formatters/__init__.py
  24. +1 −1 vendor/pygments-main/pygments/formatters/_mapping.py
  25. +1 −1 vendor/pygments-main/pygments/formatters/bbcode.py
  26. +73 −2 vendor/pygments-main/pygments/formatters/html.py
  27. +1 −1 vendor/pygments-main/pygments/formatters/img.py
  28. +1 −1 vendor/pygments-main/pygments/formatters/latex.py
  29. +1 −1 vendor/pygments-main/pygments/formatters/other.py
  30. +1 −1 vendor/pygments-main/pygments/formatters/rtf.py
  31. +1 −1 vendor/pygments-main/pygments/formatters/svg.py
  32. +1 −1 vendor/pygments-main/pygments/formatters/terminal.py
  33. +1 −1 vendor/pygments-main/pygments/formatters/terminal256.py
  34. +76 −12 vendor/pygments-main/pygments/lexer.py
  35. +2 −2 vendor/pygments-main/pygments/lexers/__init__.py
  36. +1 −1 vendor/pygments-main/pygments/lexers/_asybuiltins.py
  37. +1 −1 vendor/pygments-main/pygments/lexers/_clbuiltins.py
  38. +4 −1 vendor/pygments-main/pygments/lexers/_lassobuiltins.py
  39. +1 −1 vendor/pygments-main/pygments/lexers/_luabuiltins.py
  40. +26 −10 vendor/pygments-main/pygments/lexers/_mapping.py
  41. +11 −0 vendor/pygments-main/pygments/lexers/_openedgebuiltins.py
  42. +2 −2 vendor/pygments-main/pygments/lexers/_phpbuiltins.py
  43. +4 −2 vendor/pygments-main/pygments/lexers/_postgres_builtins.py
  44. +14 −3 vendor/pygments-main/pygments/lexers/_robotframeworklexer.py
  45. +11 −0 vendor/pygments-main/pygments/lexers/_scilab_builtins.py
  46. +2 −2 vendor/pygments-main/pygments/lexers/_sourcemodbuiltins.py
  47. +6 −6 vendor/pygments-main/pygments/lexers/_stan_builtins.py
  48. +6 −4 vendor/pygments-main/pygments/lexers/agile.py
  49. +40 −2 vendor/pygments-main/pygments/lexers/asm.py
  50. +751 −438 vendor/pygments-main/pygments/lexers/compiled.py
  51. +2 −2 vendor/pygments-main/pygments/lexers/dalvik.py
  52. +1 −1 vendor/pygments-main/pygments/lexers/dotnet.py
  53. +428 −0 vendor/pygments-main/pygments/lexers/foxpro.py
  54. +6 −5 vendor/pygments-main/pygments/lexers/functional.py
  55. +3 −3 vendor/pygments-main/pygments/lexers/hdl.py
  56. +130 −16 vendor/pygments-main/pygments/lexers/jvm.py
  57. +250 −9 vendor/pygments-main/pygments/lexers/math.py
  58. +518 −13 vendor/pygments-main/pygments/lexers/other.py
  59. +3 −2 vendor/pygments-main/pygments/lexers/parsers.py
  60. +48 −2 vendor/pygments-main/pygments/lexers/shell.py
  61. +1 −1 vendor/pygments-main/pygments/lexers/special.py
  62. +1 −1 vendor/pygments-main/pygments/lexers/sql.py
  63. +7 −6 vendor/pygments-main/pygments/lexers/templates.py
  64. +9 −9 vendor/pygments-main/pygments/lexers/text.py
  65. +264 −51 vendor/pygments-main/pygments/lexers/web.py
  66. +1 −1 vendor/pygments-main/pygments/plugin.py
  67. +1 −1 vendor/pygments-main/pygments/scanner.py
  68. +1 −1 vendor/pygments-main/pygments/style.py
  69. +1 −1 vendor/pygments-main/pygments/styles/__init__.py
  70. +1 −1 vendor/pygments-main/pygments/styles/autumn.py
  71. +1 −1 vendor/pygments-main/pygments/styles/borland.py
  72. +1 −1 vendor/pygments-main/pygments/styles/bw.py
  73. +1 −1 vendor/pygments-main/pygments/styles/colorful.py
  74. +1 −1 vendor/pygments-main/pygments/styles/default.py
  75. +1 −1 vendor/pygments-main/pygments/styles/emacs.py
  76. +1 −1 vendor/pygments-main/pygments/styles/friendly.py
  77. +1 −1 vendor/pygments-main/pygments/styles/fruity.py
  78. +1 −1 vendor/pygments-main/pygments/styles/manni.py
  79. +1 −1 vendor/pygments-main/pygments/styles/monokai.py
  80. +1 −1 vendor/pygments-main/pygments/styles/murphy.py
  81. +1 −1 vendor/pygments-main/pygments/styles/native.py
  82. +1 −1 vendor/pygments-main/pygments/styles/pastie.py
  83. +1 −1 vendor/pygments-main/pygments/styles/perldoc.py
  84. +1 −1 vendor/pygments-main/pygments/styles/rrt.py
  85. +1 −1 vendor/pygments-main/pygments/styles/tango.py
  86. +1 −1 vendor/pygments-main/pygments/styles/trac.py
  87. +1 −1 vendor/pygments-main/pygments/styles/vim.py
  88. +1 −1 vendor/pygments-main/pygments/styles/vs.py
  89. +1 −1 vendor/pygments-main/pygments/token.py
  90. +1 −1 vendor/pygments-main/pygments/unistring.py
  91. +1 −1 vendor/pygments-main/pygments/util.py
  92. +2 −2 vendor/pygments-main/scripts/check_sources.py
  93. +2 −0 vendor/pygments-main/scripts/detect_missing_analyse_text.py
  94. +1 −1 vendor/pygments-main/scripts/find_codetags.py
  95. +5 −6 vendor/pygments-main/scripts/find_error.py
  96. +1 −0 vendor/pygments-main/setup.cfg
  97. +6 −4 vendor/pygments-main/setup.py
  98. +1 −0 vendor/pygments-main/tests/examplefiles/BOM.js
  99. +25 −0 vendor/pygments-main/tests/examplefiles/autoit_submit.au3
  100. +308 −0 vendor/pygments-main/tests/examplefiles/bigtest.nsi
  101. +284 −0 vendor/pygments-main/tests/examplefiles/ca65_example
  102. +9 −0 vendor/pygments-main/tests/examplefiles/cbmbas_example
  103. +89 −4 vendor/pygments-main/tests/examplefiles/classes.dylan
  104. +3,556 −0 vendor/pygments-main/tests/examplefiles/example.cob
  105. +161 −0 vendor/pygments-main/tests/examplefiles/example.prg
  106. +45 −0 vendor/pygments-main/tests/examplefiles/example.shell-session
  107. +28 −0 vendor/pygments-main/tests/examplefiles/example.ts
  108. +2 −2 vendor/pygments-main/tests/examplefiles/inet_pton6.dg
  109. +28 −0 vendor/pygments-main/tests/examplefiles/logos_example.xm
  110. +73 −0 vendor/pygments-main/tests/examplefiles/mg_sample.pro
  111. +112 −0 vendor/pygments-main/tests/examplefiles/minehunt.qml
  112. +95 −0 vendor/pygments-main/tests/examplefiles/nanomsg.intr
  113. +163 −0 vendor/pygments-main/tests/examplefiles/phpMyAdmin.spec
  114. +191 −701 vendor/pygments-main/tests/examplefiles/rust_example.rs
  115. +9 −0 vendor/pygments-main/tests/examplefiles/session.dylan-console
  116. +10 −0 vendor/pygments-main/tests/examplefiles/test.opa
  117. +120 −0 vendor/pygments-main/tests/examplefiles/test2.pypylog
  118. +37 −0 vendor/pygments-main/tests/examplefiles/unix-io.lid
  119. +1 −1 vendor/pygments-main/tests/old_run.py
  120. +3 −2 vendor/pygments-main/tests/run.py
  121. +36 −0 vendor/pygments-main/tests/support/tags
  122. +3 −2 vendor/pygments-main/tests/test_basic_api.py
  123. +1 −1 vendor/pygments-main/tests/test_clexer.py
  124. +1 −1 vendor/pygments-main/tests/test_cmdline.py
  125. +1 −1 vendor/pygments-main/tests/test_examplefiles.py
  126. +17 −1 vendor/pygments-main/tests/test_html_formatter.py
  127. +1 −1 vendor/pygments-main/tests/test_latex_formatter.py
  128. +1 −1 vendor/pygments-main/tests/test_perllexer.py
  129. +1 −1 vendor/pygments-main/tests/test_regexlexer.py
  130. +1 −1 vendor/pygments-main/tests/test_token.py
  131. +1 −1 vendor/pygments-main/tests/test_using_api.py
  132. +5 −4 vendor/pygments-main/tests/test_util.py
View
@@ -0,0 +1,9 @@
+changelog
+===========
+
+Version 0.3.4 (Dec 28, 2012)
+
+* Add support for Windows
+* Add MIT license
+
+
@@ -9,6 +9,7 @@ Other contributors, listed alphabetically, are:
* Kumar Appaiah -- Debian control lexer
* Ali Afshar -- image formatter
* Andreas Amann -- AppleScript lexer
+* Timothy Armstrong -- Dart lexer fixes
* Jeffrey Arnold -- R/S, Rd, BUGS, Jags, and Stan lexers
* Jeremy Ashkenas -- CoffeeScript lexer
* Stefan Matthias Aust -- Smalltalk lexer
@@ -25,6 +26,7 @@ Other contributors, listed alphabetically, are:
* Hiram Chirino -- Scaml and Jade lexers
* Ian Cooper -- VGL lexer
* Leaf Corcoran -- MoonScript lexer
+* Christian Jann -- ShellSession lexer
* Christopher Creutzig -- MuPAD lexer
* Pete Curry -- bugfixes
* Owen Durni -- haXe lexer
@@ -33,24 +35,28 @@ Other contributors, listed alphabetically, are:
* Artem Egorkine -- terminal256 formatter
* James H. Fisher -- PostScript lexer
* Carlos Galdino -- Elixir and Elixir Console lexers
+* Michael Galloy -- IDL lexer
* Naveen Garg -- Autohotkey lexer
* Laurent Gautier -- R/S lexer
* Alex Gaynor -- PyPy log lexer
+* Alain Gilbert -- TypeScript lexer
* Bertrand Goetzmann -- Groovy lexer
* Krzysiek Goj -- Scala lexer
* Matt Good -- Genshi, Cheetah lexers
* Patrick Gotthardt -- PHP namespaces support
* Olivier Guibe -- Asymptote lexer
+* Jordi Gutiérrez Hermoso -- Octave lexer
* Martin Harriman -- SNOBOL lexer
* Matthew Harrison -- SVG formatter
* Steven Hazel -- Tcl lexer
* Aslak Hellesøy -- Gherkin lexer
* Greg Hendershott -- Racket lexer
-* Jordi Gutiérrez Hermoso -- Octave lexer
* David Hess, Fish Software, Inc. -- Objective-J lexer
* Varun Hiremath -- Debian control lexer
* Doug Hogan -- Mscgen lexer
* Ben Hollis -- Mason lexer
+* Dustin Howett -- Logos lexer
+* Alastair Houghton -- Lexer inheritance facility
* Tim Howard -- BlitzMax lexer
* Ivan Inozemtsev -- Fantom lexer
* Brian R. Jackson -- Tea lexer
@@ -69,15 +75,18 @@ Other contributors, listed alphabetically, are:
* Sylvestre Ledru -- Scilab lexer
* Mark Lee -- Vala lexer
* Ben Mabey -- Gherkin lexer
+* Angus MacArthur -- QML lexer
* Simone Margaritelli -- Hybris lexer
* Kirk McDonald -- D lexer
* Gordon McGregor -- SystemVerilog lexer
* Stephen McKamey -- Duel/JBST lexer
* Brian McKenna -- F# lexer
+* Charles McLaughlin -- Puppet lexer
* Lukas Meuser -- BBCode formatter, Lua lexer
* Paul Miller -- LiveScript lexer
* Hong Minhee -- HTTP lexer
* Michael Mior -- Awk lexer
+* Bruce Mitchener -- Dylan lexer rewrite
* Reuben Morais -- SourcePawn lexer
* Jon Morton -- Rust lexer
* Paulo Moura -- Logtalk lexer
@@ -105,18 +114,22 @@ Other contributors, listed alphabetically, are:
* Joe Schafer -- Ada lexer
* Ken Schutte -- Matlab lexers
* Tassilo Schweyer -- Io, MOOCode lexers
+* Ted Shaw -- AutoIt lexer
* Joerg Sieker -- ABAP lexer
* Robert Simmons -- Standard ML lexer
* Kirill Simonov -- YAML lexer
+* Alexander Smishlajev -- Visual FoxPro lexer
* Steve Spigarelli -- XQuery lexer
* Jerome St-Louis -- eC lexer
* James Strachan -- Kotlin lexer
* Tom Stuart -- Treetop lexer
* Tiberius Teng -- default style overhaul
* Jeremy Thurgood -- Erlang, Squid config lexers
+* Brian Tiffin -- OpenCOBOL lexer
* Erick Tryzelaar -- Felix lexer
* Daniele Varrazzo -- PostgreSQL lexers
* Abe Voelker -- OpenEdge ABL lexer
+* Pepijn de Vos -- HTML formatter CTags support
* Whitney Young -- ObjectiveC lexer
* Matthias Vallentin -- Bro lexer
* Nathan Weizenbaum -- Haml and Sass lexers
@@ -2,44 +2,94 @@ Pygments changelog
==================
Issue numbers refer to the tracker at
-http://bitbucket.org/birkenfeld/pygments-main/issues.
+<http://bitbucket.org/birkenfeld/pygments-main/issues>,
+pull request numbers to the requests at
+<http://bitbucket.org/birkenfeld/pygments-main/pull-requests/merged>.
Version 1.6
-----------
-(in development, to be released xx November 2012)
+(released Feb 3, 2013)
+
+- Lexers added:
+
+ * Dylan console (PR#149)
+ * Logos (PR#150)
+ * Shell sessions (PR#158)
+
+- Fix guessed lexers not receiving lexer options (#838).
+
+- Fix unquoted HTML attribute lexing in Opa (#841).
+
+- Fixes to the Dart lexer (PR#160).
+
+
+Version 1.6rc1
+--------------
+(released Jan 9, 2013)
- Lexers added:
* AspectJ (PR#90)
+ * AutoIt (PR#122)
* BUGS-like languages (PR#89)
* Ceylon (PR#86)
* Croc (new name for MiniD)
* CUDA (PR#75)
* Dg (PR#116)
+ * IDL (PR#115)
* Jags (PR#89)
* Julia (PR#61)
* Kconfig (#711)
- * Lasso (PR#95)
+ * Lasso (PR#95, PR#113)
* LiveScript (PR#84)
* Monkey (PR#117)
* Mscgen (PR#80)
+ * NSIS scripts (PR#136)
+ * OpenCOBOL (PR#72)
+ * QML (PR#123)
+ * Puppet (PR#133)
* Racket (PR#94)
* Rdoc (PR#99)
* Robot Framework (PR#137)
+ * RPM spec files (PR#124)
* Rust (PR#67)
* Smali (Dalvik assembly)
* SourcePawn (PR#39)
* Stan (PR#89)
* Treetop (PR#125)
+ * TypeScript (PR#114)
* VGL (PR#12)
+ * Visual FoxPro (#762)
* Windows Registry (#819)
* Xtend (PR#68)
-- Fix Template Haskell highlighting (PR#63)
+- The HTML formatter now supports linking to tags using CTags files, when the
+ python-ctags package is installed (PR#87).
+
+- The HTML formatter now has a "linespans" option that wraps every line in a
+ <span> tag with a specific id (PR#82).
+
+- When deriving a lexer from another lexer with token definitions, definitions
+ for states not in the child lexer are now inherited. If you override a state
+ in the child lexer, an "inherit" keyword has been added to insert the base
+ state at that position (PR#141).
+
+- The C family lexers now inherit token definitions from a common base class,
+ removing code duplication (PR#141).
+
+- Use "colorama" on Windows for console color output (PR#142).
+
+- Fix Template Haskell highlighting (PR#63).
+
+- Fix some S/R lexer errors (PR#91).
+
+- Fix a bug in the Prolog lexer with names that start with 'is' (#810).
+
+- Rewrite Dylan lexer, add Dylan LID lexer (PR#147).
-- Fix some S/R lexer errors (PR#91)
+- Add a Java quickstart document (PR#146).
-- Fix a bug in the Prolog lexer with names that start with 'is' (#810)
+- Add a "external/autopygmentize" file that can be used as .lessfilter (#802).
Version 1.5
@@ -1,4 +1,4 @@
-Copyright (c) 2006-2012 by the respective authors (see AUTHORS file).
+Copyright (c) 2006-2013 by the respective authors (see AUTHORS file).
All rights reserved.
Redistribution and use in source and binary forms, with or without
@@ -4,7 +4,7 @@
#
# Combines scripts for common tasks.
#
-# :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+# :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
# :license: BSD, see LICENSE for details.
#
@@ -0,0 +1 @@
+157c9feaccb8
@@ -6,7 +6,7 @@
Generates a bunch of html files containing the documentation.
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -64,7 +64,7 @@ def `guess_lexer(text, **options):`
def `guess_lexer_for_filename(filename, text, **options):`
As `guess_lexer()`, but only lexers which have a pattern in `filenames`
or `alias_filenames` that matches `filename` are taken into consideration.
-
+
`pygments.util.ClassNotFound` is raised if no lexer thinks it can handle the
content.
@@ -37,7 +37,7 @@ Welcome to the Pygments documentation.
- `Write your own lexer <lexerdevelopment.txt>`_
- `Write your own formatter <formatterdevelopment.txt>`_
-
+
- `Write your own filter <filterdevelopment.txt>`_
- `Register plugins <plugins.txt>`_
@@ -41,3 +41,8 @@ Bash completion
The source distribution contains a file ``external/pygments.bashcomp`` that
sets up completion for the ``pygmentize`` command in bash.
+
+Java
+----
+
+See the `Java quickstart <java.txt>`_ document.
@@ -0,0 +1,70 @@
+=====================
+Use Pygments in Java
+=====================
+
+Thanks to `Jython <http://www.jython.org>`__ it is possible to use Pygments in
+Java.
+
+This page is a simple tutorial to get an idea of how this is working. You can
+then look at the `Jython documentation <http://www.jython.org/docs/>`__ for more
+advanced use.
+
+Since version 1.5, Pygments is deployed on `Maven Central
+<http://repo1.maven.org/maven2/org/pygments/pygments/>`__ as a JAR so is Jython
+which makes it a lot easier to create the Java project.
+
+Here is an example of a `Maven <http://www.maven.org>`__ ``pom.xml`` file for a
+project running Pygments:
+
+.. sourcecode:: xml
+
+ <?xml version="1.0" encoding="UTF-8"?>
+
+ <project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>example</groupId>
+ <artifactId>example</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.python</groupId>
+ <artifactId>jython-standalone</artifactId>
+ <version>2.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.pygments</groupId>
+ <artifactId>pygments</artifactId>
+ <version>1.5</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </project>
+
+The following Java example:
+
+.. sourcecode:: java
+
+ PythonInterpreter interpreter = new PythonInterpreter();
+
+ // Set a variable with the content you want to work with
+ interpreter.set("code", code);
+
+ // Simple use Pygments as you would in Python
+ interpreter.exec("from pygments import highlight\n"
+ + "from pygments.lexers import PythonLexer\n"
+ + "from pygments.formatters import HtmlFormatter\n"
+ + "\nresult = highlight(code, PythonLexer(), HtmlFormatter())");
+
+ // Get the result that has been set in a variable
+ System.out.println(interpreter.get("result", String.class));
+
+will print something like:
+
+.. sourcecode:: html
+
+ <div class="highlight">
+ <pre><span class="k">print</span> <span class="s">&quot;Hello World&quot;</span></pre>
+ </div>
@@ -0,0 +1,64 @@
+#!/bin/sh
+# Best effort auto-pygmentization with transparent decompression
+# (c) Reuben Thomas 2012-2013
+# This program is in the public domain.
+
+# Strategy: first see if pygmentize can find a lexer; if not, ask file; if that finds nothing, fail
+# Set the environment variable PYGMENTIZE_OPTS to configure pygments.
+
+# This program can be used as a .lessfilter for the less pager to auto-color less's output
+
+lexer=`pygmentize -N "$1"`
+if [ "$lexer" = "text" ]; then
+ file_common_opts="--brief --dereference --uncompress"
+
+ unset lexer
+ case `file --mime-type $file_common_opts "$1"` in
+ application/xml|image/svg+xml) lexer=xml;;
+ text/html) lexer=html;;
+ text/troff) lexer=nroff;;
+ text/x-asm) lexer=nasm;;
+ text/x-awk) lexer=awk;;
+ text/x-c) lexer=c;;
+ text/x-c++) lexer=cpp;;
+ text/x-diff) lexer=diff;;
+ text/x-fortran) lexer=fortran;;
+ text/x-gawk) lexer=gawk;;
+ text/x-java) lexer=java;;
+ text/x-lisp) lexer=common-lisp;;
+ text/x-lua) lexer=lua;;
+ text/x-makefile) lexer=make;;
+ text/x-msdos-batch) lexer=bat;;
+ text/x-nawk) lexer=nawk;;
+ text/x-pascal) lexer=pascal;;
+ text/x-perl) lexer=perl;;
+ text/x-php) lexer=php;;
+ text/x-po) lexer=po;;
+ text/x-python) lexer=python;;
+ text/x-ruby) lexer=ruby;;
+ text/x-shellscript) lexer=sh;;
+ text/x-tcl) lexer=tcl;;
+ text/x-tex|text/x-texinfo) lexer=latex;; # FIXME: texinfo really needs its own lexer
+
+ # Types that file outputs which pygmentize didn't support as of file 5.11, pygments 1.6rc1
+ # text/calendar
+ # text/PGP
+ # text/rtf
+ # text/texmacs
+ # text/x-bcpl
+ # text/x-info
+ # text/x-m4
+ # text/x-vcard
+ # text/x-xmcd
+ esac
+fi
+
+encoding=`file --brief --mime-encoding $file_common_opts "$1"`
+
+if [ -n "$lexer" ]; then
+ # FIXME: Specify input encoding rather than output encoding https://bitbucket.org/birkenfeld/pygments-main/issue/800
+ zcat "$1" | pygmentize -O encoding=$encoding,outencoding=UTF-8 $PYGMENTIZE_OPTS -l $lexer
+ exit 0
+fi
+
+exit 1
Oops, something went wrong.

0 comments on commit f2a45b7

Please sign in to comment.