tnichols217 / obsidian-columns

GNU General Public License v3.0
200 stars 9 forks source link

[BUG: Internal] Blank lines cause huge gap #25

Closed nousernameavailableanymore closed 2 years ago

nousernameavailableanymore commented 2 years ago

This is follow up to issue #20 .

After the update, the situation is now reversed. Instead of having blank lines causing a large gap when Obsidian Columns is placed inside Admonitions, it now shows a large gap just using Obsidian Columns (without anything else).

Test Code ("Without Admonition"):

````col
```col-md
line1

line2
line1

line2

Result: image

nousernameavailableanymore commented 2 years ago

A workaround seems to be this:

.cm-preview-code-block .columnParent p {
    margin-bottom: -1em !important;
}

Not sure if this is an actual "fix" as I dont know what actually caused the issue in the first place or if the workaround has any other impact.

tnichols217 commented 2 years ago

Fixed in commit d065bf3 version 1.1.8

By using

.columnParent {
    white-space: normal;
}

.cm-preview-code-block .admonition-content .columnParent p {
    white-space: pre-wrap;
}

snippet