`hackmd-cli export` currently adds a newline after the note content because it prints the content using the normal logging method. As a result, redirecting an exported note to a file may change its content: ```bash hackmd-cli export --noteId=<note-id> > note.md ``` The exported file should exactly match the content stored in HackMD so it can be safely edited and uploaded again. Expected behavior: - Write note content to stdout without adding or removing characters. - Preserve content both with and without a trailing newline. - Add tests for trailing newline, no trailing newline, and empty content.
Activity