This is an automated email from the ASF dual-hosted git repository. dill0wn pushed a commit to branch dw/8426 in repository https://gitbox.apache.org/repos/asf/allura.git
commit add1ceca9040644ac6ff882f0d4bf13c479632ff Author: Dillon Walls <[email protected]> AuthorDate: Fri Apr 8 20:50:11 2022 +0000 [#8246] Upgrade Pygments 2.8.1 -> 2.11.2 --- Allura/allura/lib/app_globals.py | 1 + .../forgegit/tests/functional/test_controllers.py | 20 ++++++++++---------- requirements.txt | 2 +- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py index 4a958b19d..2db67995a 100644 --- a/Allura/allura/lib/app_globals.py +++ b/Allura/allura/lib/app_globals.py @@ -439,6 +439,7 @@ class Globals: return Markup('<em>Empty file</em>') # Don't use line numbers for diff highlight's, as per [#1484] if lexer == 'diff': + # FIXME: this? formatter = pygments.formatters.HtmlFormatter(cssclass='codehilite', linenos=False) else: formatter = self.pygments_formatter diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py index 698478c87..be07cbd6f 100644 --- a/ForgeGit/forgegit/tests/functional/test_controllers.py +++ b/ForgeGit/forgegit/tests/functional/test_controllers.py @@ -337,11 +337,11 @@ class TestRootController(_TestCase): resp = self.app.get(h.urlquote(ci + 'tree/привіт.txt') + '?diff=407950e8fba4dbc108ffbce0128ed1085c52cfd7') diffhtml = str(resp.html.select_one('.diffbrowser')) assert_in(textwrap.dedent('''\ - <span class="gd">--- a/привіт.txt</span> - <span class="gi">+++ b/привіт.txt</span> - <span class="gu">@@ -1 +1,2 @@</span> - Привіт! - <span class="gi">+Which means Hello!</span>'''), + <span class="gd">--- a/привіт.txt</span><span class="w"></span> + <span class="gi">+++ b/привіт.txt</span><span class="w"></span> + <span class="gu">@@ -1 +1,2 @@</span><span class="w"></span> + <span class="w"> </span>Привіт!<span class="w"></span> + <span class="gi">+Which means Hello!</span><span class="w"></span>'''), diffhtml) resp = self.app.get(h.urlquote(ci + 'tree/привіт.txt') + '?diff=407950e8fba4dbc108ffbce0128ed1085c52cfd7&diformat=sidebyside') @@ -896,11 +896,11 @@ class TestFork(_TestCase): </li> </ul> <p>Diff:</p> -<div class="codehilite"><pre><span></span><code><span class="gd">--- old</span> -<span class="gi">+++ new</span> -<span class="gu">@@ -1 +1 @@</span> -<span class="gd">-description</span> -<span class="gi">+changed description</span> +<div class="codehilite"><pre><span></span><code><span class="gd">--- old</span><span class="w"></span> +<span class="gi">+++ new</span><span class="w"></span> +<span class="gu">@@ -1 +1 @@</span><span class="w"></span> +<span class="gd">-description</span><span class="w"></span> +<span class="gi">+changed description</span><span class="w"></span> </code></pre></div> </div> """.strip()) diff --git a/requirements.txt b/requirements.txt index 391418c6e..2f10083b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -120,7 +120,7 @@ pycparser==2.21 # via cffi pyflakes==2.4.0 # via -r requirements.in -pygments==2.9.0 +pygments==2.11.2 # via -r requirements.in pymongo==3.11.4 # via
