Skip to content

[BUG] [v0.0.7] cortex scrape stdout and --output file content lack a trailing newline #53315

@codvy8282

Description

@codvy8282

Project

cortex

Description

The scraped output ends without a terminating newline character, both when printed to stdout and when saved to a file with -o. This causes shell prompt concatenation and breaks POSIX text file conventions.

Error Message

Debug Logs

System Information

windows 11

Screenshots

https://github.com/codvy8282/images/blob/main/22.png

Steps to Reproduce

$ cortex scrape "https://example.com" --format markdown

...

Learn more$ # <-- prompt on same line

$ cortex scrape "https://example.com" -o /tmp/out.md
$ xxd /tmp/out.md | tail -1
000000a0: 2f65 7861 6d70 6c65 29 /example)

No 0a (newline) at end

Expected Behavior

Output should end with \n.

Actual Behavior

Output ends with the last content byte, no trailing newline.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions