[GH-ISSUE #541] Newline in Preview section #270

Closed
opened 2026-03-03 00:19:49 +03:00 by kerem · 5 comments
Owner

Originally created by @triet-truong on GitHub (Jul 14, 2020).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/541

New line doesn't appear in preview section.
As picture shown below, notice the line "create database ..." and "grant all ...".

image

Originally created by @triet-truong on GitHub (Jul 14, 2020). Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/541 New line doesn't appear in preview section. As picture shown below, notice the line "create database ..." and "grant all ...". ![image](https://user-images.githubusercontent.com/19305944/87381512-1af65c80-c5bf-11ea-9347-5cce4e2b4ec8.png)
kerem closed this issue 2026-03-03 00:19:49 +03:00
Author
Owner

@ZeroX-DG commented on GitHub (Jul 14, 2020):

By default, everything you type in will be consider as markdown. Thus no newline will be preserved. However, if you want to keep the newlines, you can wrap the content inside a codeblock.

create database 'library_production';
grant all privileges on library_production.*;
<!-- gh-comment-id:657974755 --> @ZeroX-DG commented on GitHub (Jul 14, 2020): By default, everything you type in will be consider as markdown. Thus no newline will be preserved. However, if you want to keep the newlines, you can wrap the content inside a codeblock. ``` create database 'library_production'; grant all privileges on library_production.*; ```
Author
Owner

@triet-truong commented on GitHub (Jul 14, 2020):

I tested a few online markdown editors like:

And all of them preserve new line, even on this Github md editor. Can you check on that?

<!-- gh-comment-id:658021991 --> @triet-truong commented on GitHub (Jul 14, 2020): I tested a few online markdown editors like: - https://dillinger.io/ - https://stackedit.io/app - https://pandao.github.io/editor.md/en.html And all of them preserve new line, even on this Github md editor. Can you check on that?
Author
Owner

@ZeroX-DG commented on GitHub (Jul 14, 2020):

Well, I know what you are talking about. It's best to wrap the content in a codeblock. But if you prefer to keep the newline, you can go to setting and add this piece of code to the custom CSS:

p {
  white-space: pre;
} 
<!-- gh-comment-id:658039552 --> @ZeroX-DG commented on GitHub (Jul 14, 2020): Well, I know what you are talking about. It's best to wrap the content in a codeblock. But if you prefer to keep the newline, you can go to setting and add this piece of code to the custom CSS: ```css p { white-space: pre; } ```
Author
Owner

@triet-truong commented on GitHub (Jul 14, 2020):

Thank you very much for the help. I think the below piece of custom CSS code suits me most.
Hope it's good enough to be a default setting.

p {
  white-space: pre-wrap;
} 
<!-- gh-comment-id:658078678 --> @triet-truong commented on GitHub (Jul 14, 2020): Thank you very much for the help. I think the below piece of custom CSS code suits me most. Hope it's good enough to be a default setting. ```css p { white-space: pre-wrap; } ```
Author
Owner

@Flexo013 commented on GitHub (Jul 15, 2020):

For users migrating from Boostnote Legacy to BoostNote.next:

The solution mentioned above by @Trieste96 will act just like the 'Render newlines in Markdown paragraphs as <br>' option from the old app.

image

<!-- gh-comment-id:658575952 --> @Flexo013 commented on GitHub (Jul 15, 2020): For users migrating from Boostnote Legacy to BoostNote.next: The solution mentioned above by @Trieste96 will act just like the _'Render newlines in Markdown paragraphs as \<br\>'_ option from the old app. ![image](https://user-images.githubusercontent.com/4507015/87511896-6455b300-c676-11ea-9389-5103e1565b3f.png)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/BoostNote-App#270
No description provided.