risotto icon indicating copy to clipboard operation
risotto copied to clipboard

Long line not wrapped in code block when displaying line number

Open Vinfall opened this issue 2 years ago • 0 comments

Hugo version

I can reproduce this on v0.104.2 and v0.104.3. I install the extended version and it comes from Void Linux package, you can get the src template here.

Description

When lineNos = true is set in site config, writing a long line in code block will result in unwrapped text.

Steps to reproduce

hugo new site test
cd test/
git clone https://github.com/joeroe/risotto themes/risotto

mkdir -p content/post/
cp themes/risotto/exampleSite/content/post/markdown-syntax.md content/post/
cp themes/risotto/exampleSite/config.toml ./

sed -i 's/Test/Redit teque digerit hominumque toris verebor lumina non cervice subde tollit usus habet Arctonque, furores quas nec ferunt. Quoque montibus nunc caluere tempus inhospita parcite confusaque translucet patri vestro qui optatis lumine cognoscere flos nubis! Fronde ipsamque patulos Dryopen deorum./g' content/post/markdown-syntax.md
echo "[markup.highlight]
  lineNos = true" >> config.toml

hugo server

Then go to http://localhost:1313/post/markdown-syntax/ and you'll find this: firefox_0qPaIbFgMZ cleaned

What I Expect

It gets wrapped, just like what Code block indented with four spaces shows.

Edit: add Hugo version and more info.

Vinfall avatar Oct 14 '22 07:10 Vinfall