Skip to content

Commit

Permalink
Merge pull request #1456 from github/python3-rst
Browse files Browse the repository at this point in the history
Render RST using python3
  • Loading branch information
Carl Brasic authored Mar 31, 2021
2 parents 194e363 + 4230afe commit 0ed8aff
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 5 deletions.
8 changes: 6 additions & 2 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.0.0 - 2021-03-31

* Drop support for Python 2 in RST rendering [#1456](https://github.com/github/markup/pull/1456)

## 3.0.5 - 2020-11-12

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

### Added

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

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

Expand Down
2 changes: 1 addition & 1 deletion lib/github-markup.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module GitHub
module Markup
VERSION = '3.0.5'
VERSION = '4.0.0'
Version = VERSION
end
end
2 changes: 1 addition & 1 deletion lib/github/markups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

command(
::GitHub::Markups::MARKUP_RST,
"python2 -S #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html",
"python3 #{Shellwords.escape(File.dirname(__FILE__))}/commands/rest2html",
/re?st(\.txt)?/,
["reStructuredText"],
"restructuredtext"
Expand Down
2 changes: 1 addition & 1 deletion script/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ set -e
cd $(dirname "$0")/..

bundle install
easy_install docutils
pip3 install docutils
41 changes: 41 additions & 0 deletions test/markups/README.rst.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,47 @@ <h2><a href="#id1">Header 2</a></h2>
<li>Somé UTF-8°</li>
</ol>
<p>The UTF-8 quote character in this table used to cause python to go boom. Now docutils just silently ignores it.</p>
<table>
Things that are Awesome (on a scale of 1-11)




<tbody valign="top">
<tr>
<td>Thing</td>
<td>Awesomeness</td>
</tr>
<tr>
<td>Icecream</td>
<td>7</td>
</tr>
<tr>
<td>Honey Badgers</td>
<td>10.5</td>
</tr>
<tr>
<td>Nickelback</td>
<td>-2</td>
</tr>
<tr>
<td>Iron Man</td>
<td>10</td>
</tr>
<tr>
<td>Iron Man 2</td>
<td>3</td>
</tr>
<tr>
<td>Tabular Data</td>
<td>5</td>
</tr>
<tr>
<td>Made up ratings</td>
<td>11</td>
</tr>
</tbody>
</table>
<pre>
A block of code
</pre>
Expand Down

0 comments on commit 0ed8aff

Please sign in to comment.