Merge "Fixing duplicate label issue."
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import os
|
import os
|
||||||
|
import random
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
@@ -198,7 +199,8 @@ class RestMethodDirective(rst.Directive):
|
|||||||
|
|
||||||
# We need to build a temporary target that we can replace
|
# We need to build a temporary target that we can replace
|
||||||
# later in the processing to get the TOC to resolve correctly.
|
# later in the processing to get the TOC to resolve correctly.
|
||||||
temp_target = "%s-selector" % node['target']
|
temp_target = "%s-%d-selector" % (node['target'],
|
||||||
|
random.randint(1, 1000))
|
||||||
target = nodes.target(ids=[temp_target])
|
target = nodes.target(ids=[temp_target])
|
||||||
self.state.add_target(temp_target, '', target, lineno)
|
self.state.add_target(temp_target, '', target, lineno)
|
||||||
section += node
|
section += node
|
||||||
|
|||||||
Reference in New Issue
Block a user