Remove extra linebreak from core Block and python PythonBlock components - #285
Remove extra linebreak from core Block and python PythonBlock components#285bterlson wants to merge 2 commits into
Conversation
|
All changed packages have been documented.
Show changes
|
jongio
left a comment
There was a problem hiding this comment.
The design makes sense: distinguishing "no visible closer" (closer="") from "no closer AND no trailing break" (closer={false}) is a clean way to fix the extra blank lines Python blocks were emitting. Tests are thorough and the migration path is documented in the chronus changefiles.
Two small items below.
Note: this PR has merge conflicts with main that'll need resolving before merge.
| * no closing punctuation will be added and there will be no trailing newline. | ||
| */ | ||
| closer?: string; | ||
| closer?: string | boolean; |
There was a problem hiding this comment.
Consider narrowing this to string | false instead of string | boolean. Only alse has defined special semantics here (suppress trailing break + render nothing). Passing rue would silently produce no visible closer but still emit a trailing break, which is an odd state that's hard to distinguish from the default. string | false communicates intent more precisely and prevents accidental misuse.
| - "@alloy-js/core" | ||
| --- | ||
|
|
||
| The `<Block>` component no longer emits an empty line when the `closer` prop is `false. No newline at end of file |
There was a problem hiding this comment.
Minor: missing closing backtick after alse - should be alse with the closing tick.
No description provided.