diff --git a/debian/control b/debian/control
index 6077325b097b7b0eb5f4ce68ae402802aa50fadf..15bcd0505ea14434a68acb621f7d17a785acddc6 100644
--- a/debian/control
+++ b/debian/control
@@ -21,7 +21,8 @@ Build-Depends: asciidoctor,
                ruby-redcarpet | ruby-rdiscount | ruby-maruku | ruby-kramdown,
                ruby-redcloth,
                ruby-sanitize,
-               ruby-wikicloth
+               ruby-wikicloth,
+               ruby-commonmarker
 Standards-Version: 4.6.0
 Vcs-Git: https://salsa.debian.org/ruby-team/ruby-github-markup.git
 Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-github-markup
diff --git a/debian/patches/fix-minor-changes-html.patch b/debian/patches/fix-minor-changes-html.patch
new file mode 100644
index 0000000000000000000000000000000000000000..bda318e4b4d09a6136bd3f68e944e20c88cd727c
--- /dev/null
+++ b/debian/patches/fix-minor-changes-html.patch
@@ -0,0 +1,38 @@
+Description: adjust generated html for tests.
+ 2    With latest python-docutils in experimental MarkupTest#test_rst is
+ 3    failing. Backporting upstream commit.
+ 4
+ 5    Thanks to Dmitry Shachnev <mitya57@debian.org> for suggestion
+ 6    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996234#16
+ 7    
+ 8 Author: Abhijith PA <abhijith@debian.org>
+ 9 
+10 ---
+11 The information above should follow the Patch Tagging Guidelines, please
+12 checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+13 are templates for supplementary fields that you might want to add:
+14 
+15 Origin: https://github.com/github/markup/commit/2de4aa63c419d1cc111e01e1678caf127f0a2356
+16 Bug-Debian: https://bugs.debian.org/1013383
+17 Last-Update: 2023-01-11
+
+--- ruby-github-markup-1.7.0+dfsg.orig/test/markups/README.rst.html
++++ ruby-github-markup-1.7.0+dfsg/test/markups/README.rst.html
+@@ -9,7 +9,7 @@
+ </ul>
+ </div>
+ <a name="header-2"></a>
+-<h2><a href="#id1">Header 2</a></h2>
++<h2><a href="#toc-entry-1">Header 2</a></h2>
+ <ol>
+ <li>Blah blah <code>code</code> blah</li>
+ <li>More <code>code</code>, hooray</li>
+@@ -103,7 +103,7 @@ python.code('hooray')
+ </a>
+ <img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/621/badge.svg">
+ <a name="field-list"></a>
+-<h2><a href="#id2">Field list</a></h2>
++<h2><a href="#toc-entry-2">Field list</a></h2>
+ <table frame="void" rules="none">
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 35b43571277e7877dbf05ab4472e288ceef5a80a..875cd14055ba538a3f82f6f736f9676cffeb0cfd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ disable-failing-tests.patch
 fix-path-for-interpreter.patch
 adapt-tests-for-newer-html-pipeline.patch
 fix_test_markups_README_rst_html.patch
+fix-minor-changes-html.patch