Multi-paragraph quotes not rendering line breaks properly in preview mode

Steps to reproduce

Type the following in a note:

> Write (small) notes, using note sequences to develop an idea or topic
> 
> Where possible or necessary (i.e., if an idea can be considered as “start” of a new note sequence, but does fit into the current linear argumentation), branch off a new idea-path
> 
> Check if similar topic or “story line” has been written down elsewhere; if yes, add manual links / references
> 
> Identify relevant notes that function as “starting” point and tag these notes

Expected result

Renders correctly in this forum software: (blank lines in the input show as blank lines in the output)

Write (small) notes, using note sequences to develop an idea or topic

Where possible or necessary (i.e., if an idea can be considered as “start” of a new note sequence, but does fit into the current linear argumentation), branch off a new idea-path

Check if similar topic or “story line” has been written down elsewhere; if yes, add manual links / references

Identify relevant notes that function as “starting” point and tag these notes

Actual result

It looks pretty much exactly like this:


Write (small) notes, using note sequences to develop an idea or topic Where possible or necessary (i.e., if an idea can be considered as “start” of a new note sequence, but does fit into the current linear argumentation), branch off a new idea-path Check if similar topic or “story line” has been written down elsewhere; if yes, add manual links / references Identify relevant notes that function as “starting” point and tag these notes


Here’s the source code displayed, retrieved from the developer tools using view as HTML on the blockquote element:

<blockquote>
<p>Write (small) notes, using note sequences to develop an idea or topic<br><br>
Where possible or necessary (i.e., if an idea can be considered as “start” of a new note sequence, but does fit into the current linear argumentation), branch off a new idea-path<br>
.<br>
Check if similar topic or “story line” has been written down elsewhere; if yes, add manual links / references<br>
.<br>
Identify relevant notes that function as “starting” point and tag these notes</p>
</blockquote>

Manually editing the HTML in the developer pane to include an extra <br> in each line causes it to render correctly.

Until this is fixed I’m using a hacky workaround of typing . in each blank line to simulate the blank lines. It’s not the end of the world, but it is a little bit annoying.

> Write (small) notes, using note sequences to develop an idea or topic
> .
> Where possible or necessary (i.e., if an idea can be considered as “start” of a new note sequence, but does fit into the current linear argumentation), branch off a new idea-path
> .
> Check if similar topic or “story line” has been written down elsewhere; if yes, add manual links / references
> .
> Identify relevant notes that function as “starting” point and tag these notes

The alternative is to use separate block quote sections for each paragraph which disrupts the flow of thought in the quote by making them appear to be separate quotes.

Environment

  • Operating system: MacOS 10.15.7
  • Obsidian version: 0.10.1

Additional information

This is not a request for arbitrary blank lines to render in output.

Only that a single blank line indicating a separation between paragraphs within a block quote should render as a corresponding blank line in the preview output.

This is actually a CSS issue: Obsidian is setting vertical margins of 0 on .markdown-preview-view blockquote p, causing the paragraphs to get jammed together. Until it’s fixed in Obsidian, you could add something like this to a CSS snippet:

.markdown-preview-view blockquote p { margin: 16px 10px 0; }
.markdown-preview-view blockquote p:first-child,
.markdown-preview-view blockquote div+p:last-child  { margin-top: 0; }

This retains roughly similar top and bottom spacing in the blockquote, while fixing the missing paragraph spacing.

(Edit: tweaked the last-child rule as it’s only needed in the case where a blockquoted pargaraph has a ^ address, which forces an extra div+p at the end of the blockquote.)

2 Likes

That worked thanks @pjeby !

This will be fixed in 0.10.4