While trying to view a code block from Firefox, if the block only contains one line of code it is rendered closer to the line number.
I tried on the quickstart example this markdown file:
--- title: "My First Post" date: 2022-01-12T15:47:42+01:00 draft: true --- ## Code block with one line (this should be a codeblock) a = [b**2 for b in range(5)] ## Code block with multiple lines (this should be a codeblock) a = [b**2 for b in range(5)] print(a)
with the following config.toml file:
baseURL = "http://example.org/" languageCode = "en-us" title = "My New Hugo Site" theme = "ananke" [markup] [markup.highlight] pygmentsUseClasses = true anchorLineNos = false codeFences = true guessSyntax = false hl_Lines = "" lineAnchors = "" lineNoStart = 1 lineNos = true lineNumbersInTable = true
On Chrome and Microsoft Edge everything looks good.
Since this was tried on an empty project I feel like it is more a bug. I noticed that the bug can be fixed if the generated html is free of any white spaces inside the span tags.