MacDownApp / MacDownApp/macdown
Render newline literally doesn't work randomly
Nobody has claimed this yet.
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Version: Version 0.7.1 (870)
Hi, `Render newline literally` doesn't work randomly. I am not sure how to reproduce this problem. It just seems Macdown doesn't like some of my files. `Render newline literally` works for most of files and does not work for some of files. The issue frequency is not very rare, like 10% of time? Just a guess. You can have a look at the screenshots:

**Edited:** For the file which doesn't work, if I uncheck/disable and then check/enable again the `Render newline literally` option in the Preference, it will work for now. But if I close the file or quit Macdown and reopen it, the newline can not be rendered correctly again. Thus I have to disable/enable the option everytime for the broken behavior files. I am very curious how this can happen to just some of the files. This really doesn't make sense to me.
Please check the following screenshot for more detail. From the terminal diff command, you can see that `test.md` and `test2.md` have the exact same content:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the equivalent test.md and test2.md files described in the report, using the Render newline literally preference. Compare rendering before and after closing and reopening the files, including the preference toggle workaround. Done means the newline behavior is reproducible and remains correct after reopening without manually toggling the preference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, markdown, objective-c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100