Line breaks rendered when they should be ignored

Steps to reproduce

New file, add:

# wiki

Hi this is a test
of a wrapped paragraph.

Click “Preview”.

Expected result

The paragraph is in a single line if the text fits the window width.

Actual result

The paragraph is broken on the line break, which is non standard markdown behavior. See:

Environment

  • Operating system: OSX 10.14.6
  • Obsidian version:0.6.7
  • Using custom CSS: No

Additional information

Screenshot, with another program previewing the same file

3 Likes

This is not a bug, more a design decision. Some people really hate that you hit enter, you have a new line in the source file but not a new line in the preview.

We’ll think about it.

I disagree. This is a bug. Markdown specifically states two spaces at the end of a line for forcing a break. We can probably all agree this is a stupid subtle rule. :slight_smile:

Some people write in other editors and wrap long line. For example… writing in Vim or Emacs in a terminal and adhering to a strict #-chars text width. When I view those files in Obsidian, or any other visual Markdown rendering app, I expect those paragraphs with line wraps to expand to the full width of the window.

As Obsidian is implemented right now paragraph text is squished as a result of those forced newlines-to-breaks and it looks terrible.

I know people will think differently on this topic and the solution is easy. Make it a configuration toggle so the user can enable forced newlines-to-breaks or ignore newlines when rendering.

This isn’t a new idea… for example, Typora has this config feature.

2 Likes

I too dislike the rule but the thing is, “two space to line break” is common mark. Not every editor out there would ignore that and if a user ever want to move onto something else, they’d have to edit a whole lot of notes. Might I suggest a switch of some kind for this, let people make their own choices.

So does Joplin and afaik StackEdit.

1 Like

I understand your points.
I am just saying that since it’s something we deliberately decided to do, it is not a “bug” (as in unexpected behaviour for us).

We will consider your suggestion of changing this behaviour or adding a toggle in the settings.

1 Like

Thank you, much appreciated.

An option will be added in v0.7.5

2 Likes