congo icon indicating copy to clipboard operation
congo copied to clipboard

Unexpected blank line when using multiple lines in an alert box

Open kneep opened this issue 1 year ago • 2 comments

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

kneep avatar May 10 '24 11:05 kneep

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

Jh123x avatar Jun 18 '24 08:06 Jh123x

This issue has been automatically marked as stale because it has not had any recent activity. If you are still experiencing this issue, please review the issue history and add a reply with any requested and/or additional information in order to keep the issue open. This issue will automatically close in 30 days if no further activity occurs.

github-actions[bot] avatar Oct 17 '24 02:10 github-actions[bot]

I'm seeing this issue as well. Would be great if this could be opened again :)

SebastianGrans avatar Apr 18 '25 13:04 SebastianGrans

iirc jmooring has advocated for the use of renderString vs markdownify; but i suspect this to be an artifact caused by prettier

wolfspyre avatar Apr 19 '25 23:04 wolfspyre

did anyone figure out the fix for this?

Yash-Garg avatar Apr 22 '25 10:04 Yash-Garg