Merge pull request #1456 from github/python3-rst

Render RST using python3
This commit is contained in:
Carl Brasic 2021-03-31 10:14:58 -05:00 коммит произвёл GitHub
Родитель 194e363c2a 4230afedbb
Коммит 0ed8aff7af
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 50 добавлений и 5 удалений

Просмотреть файл

@ -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)
@ -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)

Просмотреть файл

@ -1,6 +1,6 @@
module GitHub
module Markup
VERSION = '3.0.5'
VERSION = '4.0.0'
Version = VERSION
end
end

Просмотреть файл

@ -49,7 +49,7 @@ end
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"

Просмотреть файл

@ -5,4 +5,4 @@ set -e
cd $(dirname "$0")/..
bundle install
easy_install docutils
pip3 install docutils

Просмотреть файл

@ -16,6 +16,47 @@
<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>