summaryrefslogtreecommitdiff
path: root/tests/test_html_formatter.py
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year to 2023.Matthäus G. Chajdas2023-03-291-1/+1
|
* Fix some pyflakes lints in tests/ and scripts/ (#2333)Jean Abou-Samra2023-02-011-1/+1
|
* When using the HTML formatter with `linespans=foo`, `linenos=inline`, and ↵Maximilian Hils2022-01-311-0/+8
| | | | | `anchorlinenos=True`, (#2026) the generated anchor links should be `#foo-42` and not `#-42`.
* Happy new year.Georg Brandl2022-01-251-1/+1
|
* Update tests.Matthäus G. Chajdas2022-01-031-2/+2
|
* Add a tooltips option to HtmlFormatter. (#1822)Walter Dörwald2021-12-281-0/+14
| | | | | | | | | | | | | * Add a tooltips option to HtmlFormmater. * Rename option tooltips to debug_token_types. * Use explicit if block. * Fix check. * Document how to use the new debug_token_types option for the HTML formatter. * Remove output redirection from example call.
* Update HTML tests.Matthäus G. Chajdas2021-12-061-2/+2
| | | | | This includes a new structural diff which is more robust, as it handles changes like different attribute order.
* use `id` not `name` for line anchors; (#1725)Cyker Way2021-03-051-2/+2
| | | | | | | | | | | * use `id` not `name` for line anchors; `name` attribute on `a` element is obsolete in html5; * keep `name` to remain compatible with existing code; * update docstring; * update test files;
* Fix/1698 lineos wrapping (#1701)Matthäus G. Chajdas2021-02-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | * Fix #1698. * Change default line number styling. Instead of hardcoding black/light gray, use transparent/inherit which makes it "neutral" out of the box. linenospecial is still hard-coded and may look wrong, but that needs fixing in the style. * Prettify the test files. * Fix incorrect wrapping of TD linenos. The padding would get applied twice to "special" lines, once via <pre>, once via the <span>, which was not consistent with inline line numbers where the .special style would override the default style. To fix this, we now emit "normal" and "special" lines for td.linenos line numbers, and the normal style is applied to "normal". This brings td.linenos closer to inline line numbers, and also makes the styling between noclasses=True and noclasses=False consistent. * Document the line number styling changes.
* tests: code style fixupsGeorg Brandl2021-01-201-1/+0
|
* Run pyupgrade across codebase to modernize syntax and patterns (#1622)Jon Dufresne2021-01-171-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | pyupgrade is a tool to automatically upgrade syntax for newer versions of the Python language. The project has been Python 3 only since 35544e2fc6eed0ce4a27ec7285aac71ff0ddc473, allowing for several cleanups: - Remove unnecessary "-*- coding: utf-8 -*-" cookie. Python 3 reads all source files as utf-8 by default. - Replace IOError/EnvironmentError with OSError. Python 3 unified these exceptions. The old names are aliases only. - Use the Python 3 shorter super() syntax. - Remove "utf8" argument form encode/decode. In Python 3, this value is the default. - Remove "r" from open() calls. In Python 3, this value is the default. - Remove u prefix from Unicode strings. In Python 3, all strings are Unicode. - Replace io.open() with builtin open(). In Python 3, these functions are functionally equivalent. Co-authored-by: Matthäus G. Chajdas <Anteru@users.noreply.github.com>
* Bump copyright year.Matthäus G. Chajdas2021-01-031-1/+1
|
* Fix test.Matthäus G. Chajdas2020-10-281-1/+1
|
* Remove margin: 0 from <pre> styling.Matthäus G. Chajdas2020-10-281-1/+1
| | | | | | This seems to break some themes which were not expecting Pygments to change margins, and it doesn't look like it makes a difference for standalone Pygments.
* Speculative fix for #1579. (#1583)Matthäus G. Chajdas2020-10-241-6/+6
| | | | This removes the top/bottom padding changes, and only keeps left/right padding, in the hope that this does not break all Sphinx themes.
* all: remove "u" string prefix (#1536)Georg Brandl2020-09-081-3/+3
| | | | | | | | | | | * all: remove "u" string prefix * util: remove unirange Since Python 3.3, all builds are wide unicode compatible. * unistring: remove support for narrow-unicode builds which stopped being relevant with Python 3.3
* Update copyright year (fixes #1514.)Matthäus G. Chajdas2020-08-221-1/+1
|
* Fix Solarized line number colors (#1477)Paweł Fertyk2020-07-041-35/+78
| | | | | | | | | | | | | | | | | * Add font and background colors to Style * Move all styles to get_style_defs, add tests * Remove hardcoded styles, add special lineno style * Add styles for special line numbers in tables * Update noclasses documentation * Refactor linenos elements and styles, add tests * Update AUTHORS * Fix multiple CSS prefixes, add tests
* Remove Python 2 compatibility (#1348)Georg Brandl2020-02-291-3/+1
| | | | | | | | | | | * Remove Python 2 compatibility * remove 2/3 shims in pygments.util * update setup.py metadata * Remove unneeded object inheritance. * Remove unneeded future imports.
* Remove unittest classes from the test suite.Georg Brandl2019-11-101-163/+173
|
* Initial port to py.testGeorg Brandl2019-11-101-9/+9
| | | | | Unittest classes are kept - for now - since py.test is ok with them. Generator tests had to be switched to pytest parametrized tests.
* Fixup all headers and some more minor problems.2.4.2Georg Brandl2019-05-281-1/+1
|
* Fix ResourceWarning: unclosed fileMicka?l Schoentgen2019-01-071-6/+4
| | | | Also uniformize usage of the 'with' contact manager to prevent resource leaks.
* Fix invalid escapes due to missing raw string prefix.Georg Brandl2018-11-281-2/+2
|
* Copyright update.Georg Brandl2017-01-221-1/+1
|
* Add support for partials and path segments for Handlebars.Christian Hammond2016-11-041-0/+202
This introduces support for some missing features to the Handlebars lexer: Partials and path segments. Partials mostly appeared to work before, but the `>` in `{{> ... }}` would appear as a syntax error, as could other components of the partial. This change introduces support for: * Standard partials: `{{> partialName}}` * Partials with parameters: `{{> partialName varname="value"}}` * Ddynamic partials: `{{> (partialFunc)}}` * Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}` * Partial blocks: `{{> @partial-block}}` * Inline partials: `{{#*inline}}..{{/inline}}` It also introduces support for path segments, which can reference content in the current context or in a parent context. For instance, `this.name`, `this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked as variables.