Skip to content

Commit 4a1dc06

Browse files
committed
fix(codegen): add visual break before constraints
Constraint annotations in table description cells ran directly into the preceding description text with only a single <br/>. Double the break so constraints read as a separate paragraph.
1 parent 8960caa commit 4a1dc06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/overture-schema-codegen/src/overture/schema/codegen/markdown_renderer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def _annotate_constraint_notes(
210210
"""Append italic constraint descriptions to a field's description cell."""
211211
formatted = "<br/>".join(f"*{note}*" for note in notes)
212212
if row["description"]:
213-
row["description"] = f"{row['description']}<br/>{formatted}"
213+
row["description"] = f"{row['description']}<br/><br/>{formatted}"
214214
else:
215215
row["description"] = formatted
216216

packages/overture-schema-codegen/tests/golden/markdown/venue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ A location where musical performances take place.
1111
| `id` | `Id` | Unique identifier |
1212
| `category` | `"music"` | |
1313
| `kind` | `"venue"` | |
14-
| `name` | `string` (optional) | Venue name<br/>*At least one of `name`, `description` must be set* |
14+
| `name` | `string` (optional) | Venue name<br/><br/>*At least one of `name`, `description` must be set* |
1515
| `description` | `string` (optional) | *At least one of `name`, `description` must be set* |
1616
| `geometry` | `geometry` | *Allowed geometry types: Point, Polygon* |
1717
| `capacity` | `int64` (optional) | *`≥ 1`* |
18-
| `resident_ensemble` | `Id` (optional) | A unique identifier<br/>*References `Instrument` (belongs to)* |
18+
| `resident_ensemble` | `Id` (optional) | A unique identifier<br/><br/>*References `Instrument` (belongs to)* |
1919

2020
## Constraints
2121

0 commit comments

Comments
 (0)