summaryrefslogtreecommitdiff
path: root/sphinx/highlighting.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the default encoding of source files is utf-8. The encoding cookie is now unnecessary and redundant so remove it. For more details, see the docs: https://docs.python.org/3/howto/unicode.html#the-string-type > The default encoding for Python source code is UTF-8, so you can > simply include a Unicode character in a string literal ... Includes a fix for the flake8 header checks to stop expecting an encoding cookie.
* | refactor: Remove u-prefix from stringsTakeshi KOMIYA2018-12-161-3/+3
| |
* | Replace pycompat.htmlescape() by html.escape()Takeshi KOMIYA2018-12-161-2/+2
| |
* | Replace all "unicode" type by "str"Takeshi KOMIYA2018-12-151-7/+6
| |
* | Move to py3 mode for mypy (and remove many "type: ignore" comments)Takeshi KOMIYA2018-12-151-1/+1
| |
* | Add sphinx.util.typing:unicode to help mypy-3 migrationTakeshi KOMIYA2018-11-241-0/+1
| |
* | Always prefer dict literals over calls to dict()Jon Dufresne2018-11-131-9/+9
| | | | | | | | | | Dict literals are always slightly faster and are idiomatic modern Python.
* | Merge branch '1.8'Takeshi KOMIYA2018-11-011-2/+2
|\ \ | |/
| * Fix #5471: Show appropriate warning for deprecated APIsTakeshi KOMIYA2018-10-171-2/+2
| |
* | Merge branch '1.8'Takeshi KOMIYA2018-10-161-2/+2
|\ \ | |/
| * Fix mypy violationsTakeshi KOMIYA2018-10-161-2/+2
| |
* | Remove unnecessary object from class definitionsJon Dufresne2018-09-111-1/+1
|/ | | | | In Python 3, all classes are new-style classes. The object in the definition is redundant and unnecessary.
* Apply :confval:`trim_doctest_flags` to all builders (cf. text, manpages)Takeshi KOMIYA2018-07-211-2/+6
|
* ``sphinx.highlighting.PygmentsBridge.unhighlight()`` is deprecatedTakeshi KOMIYA2018-07-211-0/+5
|
* Remove unused codeTakeshi KOMIYA2018-07-201-2/+0
| | | | | Now sphinx depends on pygments-2.0 or higher. So this code is not passed.
* Merge branch '1.7'Takeshi KOMIYA2018-03-181-3/+2
|\
| * Revert "Use typing.TYPE_CHECKING for typehints"Takeshi KOMIYA2018-03-131-3/+2
| | | | | | | | This reverts commit a073e17537c2aacaac305feadea58d4473ec97f4.
* | Make console and warning messages translatableTakeshi KOMIYA2018-03-031-3/+4
|/
* Use typing.TYPE_CHECKING for typehintsTakeshi KOMIYA2018-02-141-2/+3
|
* Use flake8-import-orderTakeshi KOMIYA2018-01-281-10/+9
|
* A happy new year!Takeshi KOMIYA2018-01-011-1/+1
|
* Merge branch 'stable'Takeshi KOMIYA2017-03-261-1/+1
|\
| * Year++Takeshi KOMIYA2017-03-261-1/+1
| |
* | Upgrade to mypy-0.5Takeshi KOMIYA2017-03-031-1/+1
| |
* | Add mypy annotationsTakeshi KOMIYA2017-02-101-6/+16
| |
* | Use sphinx.util.logging instead app.warn()Takeshi KOMIYA2017-01-021-12/+12
| |
* | Merge branch 'stable'Takeshi KOMIYA2016-12-201-1/+1
|\ \ | |/
| * Fix the warning type ``misc.highlighting_failure`` does not workTakeshi KOMIYA2016-12-201-1/+1
| |
* | Merge branch '1.5-release' into mastershimizukawa2016-12-051-1/+2
|\ \ | |/
| * Fix #3185: Add new warning type ``misc.highlighting_failure``Takeshi KOMIYA2016-12-031-1/+2
| |
* | Add type-check annotations to sphinx.*Takeshi KOMIYA2016-11-161-1/+2
|/
* Highlighting fallbacks by defaultTakeshi KOMIYA2016-02-201-53/+5
| | | | | | | | | | In 423bf7b, I tried to add fallback mechanism to ``python3``. But it breaks the python3 highlighting on python2 environment. This adds ``'default'`` to highlighting languages; it works like ``'python3'``, but fallbacks if failed Highlighting. And this removes try-parse step from ``'python3'`` language. Now, it highlights regardless of runtime environments. Thanks to Yoshiki SHIBUKAWA.
* Fix code-block literals raises highlighting warnings by defaultTakeshi KOMIYA2016-02-171-6/+6
|
* The default highlight language is now Python 3.Georg Brandl2016-02-141-6/+10
| | | | | | | | References: #2279. This means that source code is highlighted as Python 3 (which is mostly a superset of Python 2), and no parsing is attempted to distinguish valid code.
* Merge branch 'stable'Takeshi KOMIYA2016-01-181-1/+5
|\
| * Fix #1565: Show warning if Pygments throws an ErrorTokenTakeshi KOMIYA2016-01-181-1/+5
| |
* | Merge branch 'stable'Georg Brandl2016-01-141-1/+1
|\ \ | |/
| * Obligatory copyright update.Georg Brandl2016-01-141-1/+1
| |
| * Fix #1790 literalinclude strips empty lines at the head and tailTakeshi KOMIYA2015-04-021-6/+6
| |
* | FIX : fix syntax error in python 3.5Thomas A Caswell2015-05-121-1/+1
| | | | | | | | | | Be explicit about grouping between `**` in call and the `or` expression.
* | Fix #1790 literalinclude strips empty lines at the head and tailTakeshi KOMIYA2015-03-311-6/+6
|/
* pep8 fixesGeorg Brandl2015-03-081-2/+2
|
* Fix #1620: Use VerbatimBorderColor to add frame to code-block in LaTeXTakeshi KOMIYA2015-01-181-3/+1
|
* highlighting: fix potential TypeErrorGeorg Brandl2015-01-061-1/+1
|
* Add highlight_options configuration valueEricFromCanada2015-01-051-2/+2
| | | | | | | | | | | | This changeset adds the `highlight_options` configuration value, which specifies a dict of key-value pairs to pass to the Pygments highlighter specified with `highlight_language`. For example, specifying `highlight_options = {'funcnamehighlighting' : False}` for the 'php' lexer will disable function name highlighting. Both the HTML and LaTeX writers have been updated to include the options when calling `highlight_block()`, as long as the currently selected language matches what was set with `highlight_language`, i.e. not when modified by `highlight::` or `code-block::` directives.
* Merge branch 'stable'Georg Brandl2015-01-031-1/+1
|\
| * all: update copyrightGeorg Brandl2015-01-031-1/+1
| |
* | Add frame to code-block in LaTeXtk0miya2014-10-081-1/+3
| |
* | Make pygments unconditional, it is required by setup.py anyway.Georg Brandl2014-09-211-43/+20
| |
* | remove 'six' name except importing line.Takayuki Shimizukawa2014-04-301-3/+2
| |