nuxt-themes / alpine

The minimalist blog theme, powered by Nuxt & Markdown.
https://alpine.nuxt.space
MIT License
294 stars 54 forks source link

[Bug] Line break in Hero component #63

Closed clemcode closed 2 years ago

clemcode commented 2 years ago

The Markdown line break does not work in the Hero component.

Reproduction: https://stackblitz.com/edit/nuxt-starter-w3hmbt?file=content%2Findex.md Capture d’écran 2022-08-17 à 08.49.10.png

atinux commented 2 years ago

It was working when using

::hero
---
image: 'https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1064&q=80'
---
#title
Hi, I am Alpine.
#description
This is the first line.<br>
I should be in another line
::

The issue was the fact that we were using the unwrap="p" in the description slot.

I pushed a fix (see https://github.com/nuxt-themes/alpine/runs/7875573789?check_suite_focus=true to know once edge released)