-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update python-readme_renderer to version 37.3 / rev 10 via SR 1055954
https://build.opensuse.org/request/show/1055954 by user dgarcia + dimstar_suse - Add fix-tests-pygments-2.14.0.patch to adapt tests to the new version of pygments gh#pypa/readme_renderer#272
- Loading branch information
1 parent
947b6ff
commit 07353eb
Showing
5 changed files
with
131 additions
and
3 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
110 changes: 110 additions & 0 deletions
110
packages/p/python-readme_renderer/fix-tests-pygments-2.14.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
From c213bb9f3adfc1dccc2f03141489f833bd83db53 Mon Sep 17 00:00:00 2001 | ||
From: Daniel Garcia Moreno <daniel.garcia@suse.com> | ||
Date: Wed, 4 Jan 2023 17:21:48 +0100 | ||
Subject: [PATCH] Adapt tests to pygments 2.14.0 | ||
|
||
This patch update the test fixtures to match the output of pygments | ||
2.14.0 | ||
--- | ||
tests/fixtures/test_CommonMark_008.html | 4 ++-- | ||
tests/fixtures/test_GFM_doublequotes.html | 8 ++++---- | ||
tests/fixtures/test_GFM_highlight.html | 6 +++--- | ||
tests/fixtures/test_GFM_malicious_pre.html | 2 +- | ||
tests/fixtures/test_rst_008.html | 18 +++++++++--------- | ||
5 files changed, 19 insertions(+), 19 deletions(-) | ||
|
||
diff --git a/tests/fixtures/test_CommonMark_008.html b/tests/fixtures/test_CommonMark_008.html | ||
index b941909..4d52a37 100644 | ||
--- a/tests/fixtures/test_CommonMark_008.html | ||
+++ b/tests/fixtures/test_CommonMark_008.html | ||
@@ -9,8 +9,8 @@ | ||
<span class="n">dog</span> <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span><span class="s1">'Fido'</span><span class="p">)</span> | ||
</pre> | ||
<p>and then here is some bash:</p> | ||
-<pre lang="bash"><span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span> <span class="o">=</span> <span class="s2">"--help"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> | ||
- <span class="nb">echo</span> <span class="s2">"OK"</span> | ||
+<pre lang="bash"><span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"--help"</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span> | ||
+<span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"OK"</span> | ||
<span class="k">fi</span> | ||
</pre> | ||
<p>or click <a href="http://www.surveymonkey.com" rel="nofollow">SurveyMonkey</a></p> | ||
diff --git a/tests/fixtures/test_GFM_doublequotes.html b/tests/fixtures/test_GFM_doublequotes.html | ||
index 546fd39..1353714 100644 | ||
--- a/tests/fixtures/test_GFM_doublequotes.html | ||
+++ b/tests/fixtures/test_GFM_doublequotes.html | ||
@@ -2,10 +2,10 @@ | ||
<pre><code>This is code text. | ||
</code></pre> | ||
<pre lang="python3"><span class="k">def</span> <span class="nf">this_is_python</span><span class="p">():</span> | ||
- <span class="sd">"""This is a docstring."""</span> | ||
+<span class="w"> </span><span class="sd">"""This is a docstring."""</span> | ||
<span class="k">pass</span> | ||
</pre> | ||
-<pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span><span class="w"></span> | ||
-<span class="w"> </span><span class="k">return</span><span class="w"></span> | ||
-<span class="p">}</span><span class="w"></span> | ||
+<pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span> | ||
+<span class="w"> </span><span class="k">return</span> | ||
+<span class="p">}</span> | ||
</pre> | ||
diff --git a/tests/fixtures/test_GFM_highlight.html b/tests/fixtures/test_GFM_highlight.html | ||
index 4094325..c2cf7bb 100644 | ||
--- a/tests/fixtures/test_GFM_highlight.html | ||
+++ b/tests/fixtures/test_GFM_highlight.html | ||
@@ -4,9 +4,9 @@ | ||
<pre lang="python3"><span class="k">def</span> <span class="nf">this_is_python</span><span class="p">():</span> | ||
<span class="k">pass</span> | ||
</pre> | ||
-<pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span><span class="w"></span> | ||
-<span class="w"> </span><span class="k">return</span><span class="w"></span> | ||
-<span class="p">}</span><span class="w"></span> | ||
+<pre lang="go"><span class="kd">func</span><span class="w"> </span><span class="nx">ThisIsGo</span><span class="p">(){</span> | ||
+<span class="w"> </span><span class="k">return</span> | ||
+<span class="p">}</span> | ||
</pre> | ||
<pre lang="abc">An unknown code fence block | ||
</pre> | ||
diff --git a/tests/fixtures/test_GFM_malicious_pre.html b/tests/fixtures/test_GFM_malicious_pre.html | ||
index 7194eee..245e17e 100644 | ||
--- a/tests/fixtures/test_GFM_malicious_pre.html | ||
+++ b/tests/fixtures/test_GFM_malicious_pre.html | ||
@@ -1,6 +1,6 @@ | ||
<p>This is normal text.</p> | ||
<pre lang="python3"><span class="k">def</span> <span class="nf">this_is_python</span><span class="p">():</span> | ||
- <span class="sd">"""This is a docstring."""</span> | ||
+<span class="w"> </span><span class="sd">"""This is a docstring."""</span> | ||
<span class="k">pass</span> | ||
<span class="o"><</span><span class="n">script</span> <span class="nb">type</span><span class="o">=</span><span class="s2">"text/javascript"</span><span class="o">></span><span class="n">alert</span><span class="p">(</span><span class="s1">'I am evil.'</span><span class="p">);</span><span class="o"></</span><span class="n">script</span><span class="o">></span> | ||
</pre> | ||
diff --git a/tests/fixtures/test_rst_008.html b/tests/fixtures/test_rst_008.html | ||
index 621a70c..6a01a9d 100644 | ||
--- a/tests/fixtures/test_rst_008.html | ||
+++ b/tests/fixtures/test_rst_008.html | ||
@@ -1,15 +1,15 @@ | ||
<p>Here is some Python code for a <span class="docutils literal">Dog</span>:</p> | ||
-<pre><code><span class="k">class</span> <span class="nc">Dog</span><span class="p">(</span><span class="n">Animal</span><span class="p">):</span> | ||
- <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span> | ||
- <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span> | ||
+<pre><code><span class="k">class</span> <span class="nc">Dog</span><span class="p">(</span><span class="n">Animal</span><span class="p">):</span><span class="w"> | ||
+</span> <span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span><span class="w"> | ||
+</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="n">name</span><span class="w"> | ||
|
||
- <span class="k">def</span> <span class="nf">make_sound</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> | ||
- <span class="nb">print</span><span class="p">(</span><span class="s1">'Ruff!'</span><span class="p">)</span> | ||
+</span> <span class="k">def</span> <span class="nf">make_sound</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w"> | ||
+</span> <span class="nb">print</span><span class="p">(</span><span class="s1">'Ruff!'</span><span class="p">)</span><span class="w"> | ||
|
||
-<span class="n">dog</span> <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span><span class="s1">'Fido'</span><span class="p">)</span></code></pre> | ||
+</span><span class="n">dog</span> <span class="o">=</span> <span class="n">Dog</span><span class="p">(</span><span class="s1">'Fido'</span><span class="p">)</span></code></pre> | ||
<p>and then here is some bash:</p> | ||
-<pre><code><span class="k">if</span> <span class="o">[</span> <span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span> <span class="o">=</span> <span class="s2">"--help"</span> <span class="o">]</span><span class="p">;</span> <span class="k">then</span> | ||
- <span class="nb">echo</span> <span class="s2">"OK"</span> | ||
-<span class="k">fi</span></code></pre> | ||
+<pre><code><span class="k">if</span><span class="w"> </span><span class="o">[</span><span class="w"> </span><span class="s2">"</span><span class="nv">$1</span><span class="s2">"</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"--help"</span><span class="w"> </span><span class="o">]</span><span class="p">;</span><span class="w"> </span><span class="k">then</span><span class="w"> | ||
+ </span><span class="nb">echo</span><span class="w"> </span><span class="s2">"OK"</span><span class="w"> | ||
+</span><span class="k">fi</span></code></pre> | ||
<p>or click <a href="http://www.surveymonkey.com" rel="nofollow">SurveyMonkey</a></p> | ||
<pre><code>An unknown code fence block</code></pre> | ||
-- | ||
2.39.0 | ||
|
6 changes: 6 additions & 0 deletions
6
packages/p/python-readme_renderer/python-readme_renderer.changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters