mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
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:
@@ -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)")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user