Merge "Fix driver links rendering in the summary table"

This commit is contained in:
Zuul 2019-04-15 17:31:39 +00:00 committed by Gerrit Code Review
commit c191f22add
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Fixed driver links to render in the summary table.

View File

@ -286,7 +286,15 @@ class Directive(rst.Directive):
driver = matrix.drivers[key]
implcol = nodes.entry()
header.append(implcol)
implcol.append(nodes.strong(text=driver.title))
if driver.link:
uri = driver.link
target_ref = nodes.reference("", refuri=uri)
target_txt = nodes.inline()
implcol.append(target_txt)
target_txt.append(target_ref)
target_ref.append(nodes.strong(text=driver.title))
else:
implcol.append(nodes.strong(text=driver.title))
# We now produce the body of the table, one row for
# each feature to report on