fix(cli): trim frontmatter-strip newlines in plain read-note body

The API content field keeps the blank line left by frontmatter stripping;
plain print() rendered it as a double gap under the header. JSON mode stays
byte-faithful.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Drew Cain <groksrc@gmail.com>
This commit is contained in:
Drew Cain
2026-06-12 10:56:36 -05:00
parent eedafd6db2
commit a5114aec83
2 changed files with 13 additions and 4 deletions
+5 -2
View File
@@ -401,8 +401,11 @@ def _plain_read_note(result: dict[str, Any], *, include_frontmatter: bool = Fals
print(f"{key}: {value}")
print()
if content:
print(content)
# The API's content field keeps the blank line left by frontmatter
# stripping; trim newlines so the header gap stays a single blank line.
body = content.strip("\n") if content else ""
if body:
print(body)
else:
print("(no content)")