File tree 3 files changed +8
-2
lines changed
3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -199,8 +199,8 @@ class GitHubHTMLTranslator(HTMLTranslator):
199
199
# see also: http://bit.ly/NHtyRx
200
200
# the a is to support ::contents with ::sectnums: http://git.io/N1yC
201
201
def visit_section (self , node ):
202
- id_attribute = node .attributes ['ids' ][ 0 ]
203
- self .body .append ('<a name="%s"></a>\n ' % id_attribute )
202
+ for id_attribute in node .attributes ['ids' ]:
203
+ self .body .append ('<a name="%s"></a>\n ' % id_attribute )
204
204
self .section_level += 1
205
205
206
206
def depart_section (self , node ):
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Example text.
8
8
9
9
.. contents :: Table of Contents
10
10
11
+ .. _label_for_header_2 :
12
+
11
13
Header 2
12
14
--------
13
15
@@ -17,6 +19,8 @@ Header 2
17
19
18
20
3. Somé UTF-8°
19
21
22
+ 4. `Link to the above header <label_for_header_2 _>`_
23
+
20
24
The UTF-8 quote character in this table used to cause python to go boom. Now docutils just silently ignores it.
21
25
22
26
.. csv-table :: Things that are Awesome (on a scale of 1-11)
Original file line number Diff line number Diff line change @@ -9,11 +9,13 @@ <h2>Subtitle</h2>
9
9
</ ul >
10
10
</ div >
11
11
< a name ="header-2 "> </ a >
12
+ < a name ="label-for-header-2 "> </ a >
12
13
< h2 > < a href ="#toc-entry-1 "> Header 2</ a > </ h2 >
13
14
< ol >
14
15
< li > Blah blah < code > code</ code > blah</ li >
15
16
< li > More < code > code</ code > , hooray</ li >
16
17
< li > Somé UTF-8°</ li >
18
+ < li > < a href ="#label-for-header-2 "> Link to the above header</ a > </ li >
17
19
</ ol >
18
20
< p > The UTF-8 quote character in this table used to cause python to go boom. Now docutils just silently ignores it.</ p >
19
21
< table >
You can’t perform that action at this time.
0 commit comments