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
The following commit(s) were added to refs/heads/dw/8426 by this push:
new 8e09095a1 fixup! SF-6801 Upgrade Pygments 2.8.1 -> 2.11.2
8e09095a1 is described below
commit 8e09095a1023378500c1da5c8fc30a034a8cc977
Author: Dillon Walls <[email protected]>
AuthorDate: Wed Apr 13 20:54:32 2022 +0000
fixup! SF-6801 Upgrade Pygments 2.8.1 -> 2.11.2
---
Allura/allura/lib/app_globals.py | 1 +
.../forgegit/tests/functional/test_controllers.py | 20 ++++++++++----------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Allura/allura/lib/app_globals.py b/Allura/allura/lib/app_globals.py
index 8487d6d3e..a206017d2 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())