Skip to content

Commit 0ed8aff

Browse files
author
Carl Brasic
authored
Merge pull request #1456 from github/python3-rst
Render RST using python3
2 parents 194e363 + 4230afe commit 0ed8aff

File tree

5 files changed

+50
-5
lines changed

5 files changed

+50
-5
lines changed

HISTORY.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.0.0 - 2021-03-31
2+
3+
* Drop support for Python 2 in RST rendering [#1456](https://github.com/github/markup/pull/1456)
4+
15
## 3.0.5 - 2020-11-12
26

37
* Add commonmarker_exts to commonmarker options [#1268](https://github.com/github/markup/pull/1268)
@@ -72,8 +76,8 @@
7276

7377
### Added
7478

75-
* Re-introduce [#537](https://github.com/github/markup/pull/537) to detect language of markup document
76-
However `github-linguist` is optional and this gem will fallback to extensions for detection.
79+
* Re-introduce [#537](https://github.com/github/markup/pull/537) to detect language of markup document
80+
However `github-linguist` is optional and this gem will fallback to extensions for detection.
7781

7882
[Full changelog](https://github.com/github/markup/compare/v1.4.9...v1.5.0)
7983

lib/github-markup.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module GitHub
22
module Markup
3-
VERSION = '3.0.5'
3+
VERSION = '4.0.0'
44
Version = VERSION
55
end
66
end

lib/github/markups.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
command(
5151
::GitHub::Markups::MARKUP_RST,
52-
"python2 -S #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html",
52+
"python3 #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html",
5353
/re?st(\.txt)?/,
5454
["reStructuredText"],
5555
"restructuredtext"

script/bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -e
55
cd $(dirname "$0")/..
66

77
bundle install
8-
easy_install docutils
8+
pip3 install docutils

test/markups/README.rst.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,47 @@ <h2><a href="#id1">Header 2</a></h2>
1616
<li>Somé UTF-8°</li>
1717
</ol>
1818
<p>The UTF-8 quote character in this table used to cause python to go boom. Now docutils just silently ignores it.</p>
19+
<table>
20+
Things that are Awesome (on a scale of 1-11)
21+
22+
23+
24+
25+
<tbody valign="top">
26+
<tr>
27+
<td>Thing</td>
28+
<td>Awesomeness</td>
29+
</tr>
30+
<tr>
31+
<td>Icecream</td>
32+
<td>7</td>
33+
</tr>
34+
<tr>
35+
<td>Honey Badgers</td>
36+
<td>10.5</td>
37+
</tr>
38+
<tr>
39+
<td>Nickelback</td>
40+
<td>-2</td>
41+
</tr>
42+
<tr>
43+
<td>Iron Man</td>
44+
<td>10</td>
45+
</tr>
46+
<tr>
47+
<td>Iron Man 2</td>
48+
<td>3</td>
49+
</tr>
50+
<tr>
51+
<td>Tabular Data</td>
52+
<td>5</td>
53+
</tr>
54+
<tr>
55+
<td>Made up ratings</td>
56+
<td>11</td>
57+
</tr>
58+
</tbody>
59+
</table>
1960
<pre>
2061
A block of code
2162
</pre>

0 commit comments

Comments
 (0)