MacDownApp / MacDownApp/macdown

Render newline literally doesn't work randomly

Open
#1,060 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug help wanted
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:

![Screen Shot 2019-03-27 at 16 28 04](https://user-images.githubusercontent.com/1555508/55061198-1ba76e80-50ae-11e9-8cd7-740b96521999.png)

**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:

![Screen Shot 2019-03-27 at 16 42 35](https://user-images.githubusercontent.com/1555508/55061879-c704f300-50af-11e9-94ca-3285bea65c5e.png)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.