summaryrefslogtreecommitdiff
path: root/tests/html_linenos_expected_output
Commit message (Collapse)AuthorAgeFilesLines
* Stop the HTML formatter from emitting empty whitespace spans.Matthäus G. Chajdas2022-12-11128-384/+384
|
* Improve whitespace handling in Python.Matthäus G. Chajdas2022-12-11128-384/+384
| | | | | | | | | 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. (#2101)Matthäus G. Chajdas2022-04-2464-256/+192
| | | | | | | | | | | | | | | | | | * 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.
* Update HTML tests.Matthäus G. Chajdas2021-12-06128-736/+256
| | | | | This includes a new structural diff which is more robust, as it handles changes like different attribute order.
* Regenerate HTML test files.Matthäus G. Chajdas2021-11-13128-1472/+864
|
* Filename to <th> if linenos=table (fixes #1757) (#1759)Andy Pearce2021-03-28128-0/+992
| | | | | | | | | * 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 lineos wrapping (#1701)Matthäus G. Chajdas2021-02-1248-120/+120
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Support anchored line numbers in inline mode (#1591)Kevin Deldycke2021-02-0616-48/+48
| | | | | * Add support for anchored line numbers in inline rendering mode * Fix tests rendering anchored line number in inline mode
* Remove margin: 0 from <pre> styling.Matthäus G. Chajdas2020-10-2832-32/+32
| | | | | | 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-2432-96/+96
| | | | This removes the top/bottom padding changes, and only keeps left/right padding, in the hope that this does not break all Sphinx themes.
* Improve HTML formatter output.improve-linenos-handlingMatthäus G. Chajdas2020-07-3164-832/+704
| | | | | | | | | | | | | | | 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.
* Fix Solarized line number colors (#1477)Paweł Fertyk2020-07-0464-0/+928
* 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