diff --git a/lib/github/commands/rest2html b/lib/github/commands/rest2html index c7c89dce..c6fc663e 100755 --- a/lib/github/commands/rest2html +++ b/lib/github/commands/rest2html @@ -199,8 +199,8 @@ class GitHubHTMLTranslator(HTMLTranslator): # see also: http://bit.ly/NHtyRx # the a is to support ::contents with ::sectnums: http://git.io/N1yC def visit_section(self, node): - id_attribute = node.attributes['ids'][0] - self.body.append('\n' % id_attribute) + for id_attribute in node.attributes['ids']: + self.body.append('\n' % id_attribute) self.section_level += 1 def depart_section(self, node): diff --git a/test/markups/README.rst b/test/markups/README.rst index 53cba9e0..ad7af380 100644 --- a/test/markups/README.rst +++ b/test/markups/README.rst @@ -8,6 +8,8 @@ Example text. .. contents:: Table of Contents +.. _label_for_header_2: + Header 2 -------- @@ -17,6 +19,8 @@ Header 2 3. Somé UTF-8° +4. `Link to the above header `_ + The UTF-8 quote character in this table used to cause python to go boom. Now docutils just silently ignores it. .. csv-table:: Things that are Awesome (on a scale of 1-11) diff --git a/test/markups/README.rst.html b/test/markups/README.rst.html index f87a8065..7a0f8327 100644 --- a/test/markups/README.rst.html +++ b/test/markups/README.rst.html @@ -9,11 +9,13 @@

Subtitle

+

Header 2

  1. Blah blah code blah
  2. More code, hooray
  3. Somé UTF-8°
  4. +
  5. Link to the above header

The UTF-8 quote character in this table used to cause python to go boom. Now docutils just silently ignores it.