Merge "Highlight parameters in path"

This commit is contained in:
Jenkins 2016-06-01 23:02:18 +00:00 committed by Gerrit Code Review
commit 1785afb8b3
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;
}