docuapi icon indicating copy to clipboard operation
docuapi copied to clipboard

Backslashes in code blocks are wrapped in <span>

Open eine opened this issue 4 years ago • 4 comments

Using backslashes in a code block with a sh command, produces coloured symbols that are wrapped in <span>. As a result, additional space is shown. For example:

docker run --rm \
  -v //var/run/docker.sock://var/run/docker.sock \
  -v issues://volume \
  eine/issue-runner <ref>

docuapi_backslash

eine avatar Jan 08 '20 02:01 eine

This looks to be an issue with Chroma and I would appreciate if you could create and issue at https://github.com/alecthomas/chroma/issues which is closer to where it needs to be fixed. It would be good if you could link back to this issue so we can track the progress.

bep avatar Jan 08 '20 09:01 bep

I can't reproduce this, but it might be a bug in an older version of Chroma. I've tagged v0.7.1 if you want to update.

alecthomas avatar Jan 08 '20 23:01 alecthomas

I tried to:

  • Git clone hugo.
  • Edit go.mod to bump chroma to 0.7.1.
  • go get ./....
  • go build -o hugo.

Unfortunately, I am still getting the same output.

@bep, is there any setting/option that I might try either in hugo or in the theme?

eine avatar Jan 09 '20 03:01 eine

This is quite strange... The site hosted at GitHub Pages is correct: https://eine.github.io/issue-runner/#cli Maybe the issue is produced by hugo serve? I need to do further tests...

eine avatar Jan 09 '20 07:01 eine