| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
`anchorlinenos=True`, (#2026)
the generated anchor links should be `#foo-42` and not `#-42`.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
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;
`name` attribute on `a` element is obsolete in html5;
* keep `name` to remain compatible with existing code;
* update docstring;
* update test files;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
* remove 2/3 shims in pygments.util
* update setup.py metadata
* Remove unneeded object inheritance.
* Remove unneeded future imports.
|
| |
|
|
|
|
|
| |
Unittest classes are kept - for now - since py.test is ok with them.
Generator tests had to be switched to pytest parametrized tests.
|
| |
|
|
|
|
| |
Also uniformize usage of the 'with' contact manager to prevent resource leaks.
|
| |
|
| |
|
|
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.
|