jpanther / congo

A powerful, lightweight theme for Hugo built with Tailwind CSS.
https://jpanther.github.io/congo/
MIT License
1.21k stars 320 forks source link

Unexpected blank line when using multiple lines in an alert box #877

Open kneep opened 4 months ago

kneep commented 4 months ago

Issue description

single line:

image
{{< alert >}}
abc
{{< /alert >}}

multiple line:

image
{{< alert >}}
abc

def
{{< /alert >}}

The first and last blank lines of the second box are unexpected. Not sure about the middle one.

Theme version

v2.8.2

Hugo version

hugo v0.125.7+extended darwin/arm64 BuildDate=2024-05-08T14:46:24Z VendorInfo=brew

Which browser rendering engines are you seeing the problem on?

Chromium (Google Chrome, Microsoft Edge, Brave, Vivaldi, Opera, etc.), WebKit (Safari)

URL to sample repository or website

No response

Hugo output or build error messages

No response

Jh123x commented 3 months ago

This seems to be due to the markdownify partial in the alert shortcode.

Below is an example without markdownify in the alert box. But not sure if it affect other items image