Commit 7300c3a7 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'bug/rst-disable-patch' into 'master'

Use forked github-markup gem

To use the forked version, we must undo some patching we did before.

I'm preserving one patch that changes the interpreter from `python2` to `python3` so that we don't change the required libraries for current source installs. This will let us release the change in a patch release instead of waiting for `8.13`.

Related issue: gitlab-ce#21696

See merge request !1015
parents 19fc42dc 17f75aad
diff --git a/lib/github/commands/rest2html b/lib/github/commands/rest2html
index 7ecfe27..958cd3c 100755
--- a/lib/github/commands/rest2html
+++ b/lib/github/commands/rest2html
@@ -31,9 +31,11 @@ import sys
import os
# This fixes docutils failing with unicode parameters to CSV-Table. The -S
-# switch and the following 2 lines can be removed after upgrading to python 3.
-reload(sys)
-sys.setdefaultencoding('utf-8')
+# switch and the following 3 lines can be removed after upgrading to python 3.
+if sys.version_info[0] < 3:
+ reload(sys)
+ sys.setdefaultencoding('utf-8')
+
import site
try:
......@@ -71,8 +71,7 @@ build do
# This patch makes the github-markup gem use and be compatible with Python3
# We've sent part of the changes upstream: https://github.com/github/markup/pull/919
patch source: 'github-markup_gem-markups.patch', target: "#{gems_directory}/github-markup-1.4.0/lib/github/markups.rb"
patch source: 'github-markup_gem-rest2html.patch', target: "#{gems_directory}/github-markup-1.4.0/lib/github/commands/rest2html"
patch source: 'gitlab-markup_gem-markups.patch', target: "#{gems_directory}/gitlab-markup-1.5.0/lib/github/markups.rb"
# In order to precompile the assets, we need to get to a state where rake can
# load the Rails environment.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment