| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
This triggers a new case in the HtmlFormatter, which emits an empty span
at the end of the line for a new line, as those are removed by the
split-by-parts code. This requires separate post-processing.
Doesn't fix all whitespace issues with Python either, but we're done to
360 failing examples with that, from previously >400.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix #632.
The doc string indicates that the linenos table is wrapped in <div class="highlight">,
but the actual implementation puts the <div> inside the table cell containing the code.
This seems to cause issues as explained in #632, and given it doesn't match the
documentation, this PR restores the original behavior.
* Fix sample code in comment.
* Update CHANGES.
* Refactor the wrapping logic.
Instead of calling _wrap_div() at the end of wrap(), _wrap_div()
is now called after wrap/_wrap_tablinelinenos. This yields the
desired behavior but removes the custom <div> generation code.
|
|
|
|
|
| |
This includes a new structural diff which is more robust, as it handles
changes like different attribute order.
|
| |
|
|
|
|
|
|
|
|
|
| |
* Filename to <th> if linenos=table (fixes #1757)
* Emit `<th>` for `filename` if `linenos=table`.
* Added test cases for filename inclusion.
* Updated CHANGES
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* Add support for anchored line numbers in inline rendering mode
* Fix tests rendering anchored line number in inline mode
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the previous changes, we started to emit one <pre> per line for
line numbers. This breaks for instance the Sphinx-RTD-Theme, which
expects the line numbers to be formatted the same way as the normal
content. This commit makes the following changes:
* Emit a single <pre> inside the linenos div
* Wrap individual lines into <span> as needed
* Update all tests
* Don't yield empty <span> elements when no style is specified
This also makes the .html test files look correct when looked at with a
browser, as there is no extra whitespace in them which needs stripping.
|
|
* 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
|