I added syntax highlighting with Chroma to my Hugo site a few days ago. The rendered HTML looks fine, but copy-pasting the generated code to a text editor introduces empty lines after each code line, so
CodeLine1
CodeLine2
will end up as
CodeLine1
CodeLine2
in the text editor, at least when testing on Windows.
While writing this post I just noticed that it is caused by lineNos = true. Unfortunately, I cant use lineNumbersInTable = true because this breaks the entire layout.
I am pretty sure this is an “issue” with your text editor. Which one do you use specifically? I think it might be a misunderstood attempt of someone involved (browser or editor) to copy formatting over. Most editors these days have a “paste as plain text” function. Paste as plain text and you see what your website actually hands over. Everything else that ends up in your editor could be some default formatting for tables or list items in your editor. Not every editor is a plaintext editor. Especially on Windows. They often mix up text and RTF.
I tried to copy paste from your two links and all ends up well in plaintext. But I am not on Windows.
It is possible to make it work in Firefox and Chrome by throwing additional JavaScript onto it.
It comes down to marking the unwanted lines in CSS with user-select:none to make it work in Chrome and adding a copy event listener in JS to fix it for FF only.