Highlight parameters in path

Change-Id: Ibaa81619b23aa3fef40a59bf28cae309d13805fa
This commit is contained in:
Graham Hayes 2016-05-28 22:08:44 +02:00
parent 87a4b66d86
commit 458d8c6e9f
2 changed files with 17 additions and 0 deletions

View File

@ -444,6 +444,13 @@ def rest_method_html(self, node):
</div>
</div>"""
node['url'] = node['url'].replace(
'{',
'<span class="path_parameter">{')
node['url'] = node['url'].replace(
'}',
'}</span>')
self.body.append(tmpl % node)
raise nodes.SkipNode

View File

@ -118,3 +118,13 @@ a.operation-anchor {
.label-DELETE[href]:focus {
background-color: #c9302c;
}
span.path_parameter {
font-family: monospace;
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
white-space: nowrap;
background-color: #f9f2f4;
border-radius: 4px;
}