Skip to content

Commit

Permalink
Spec section: Avoid dupe titles; treat anchors as optional (mdn#3746)
Browse files Browse the repository at this point in the history
* Spec section: Avoid dupe titles; treat anchors as optional

* review on mdn#3746

Co-authored-by: Peter Bengtsson <mail@peterbe.com>
  • Loading branch information
Elchi3 and peterbe committed Jun 1, 2021
1 parent 308760f commit ea399bf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions client/src/document/ingredients/spec-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ export function SpecificationSection({
<tr key={spec.bcdSpecificationURL}>
<td>
<a href={spec.bcdSpecificationURL}>
{spec.title} ({spec.shortTitle})
<br />{" "}
<small>#{spec.bcdSpecificationURL.split("#")[1]}</small>
{spec.title}{" "}
{spec.title !== spec.shortTitle && `(${spec.shortTitle})`}
<br />
{spec.bcdSpecificationURL.includes("#") && (
<small>
# {`${spec.bcdSpecificationURL.split("#")[1]}`}
</small>
)}
</a>
</td>
</tr>
Expand Down

0 comments on commit ea399bf

Please sign in to comment.