bep / docuapi

Beautiful multilingual API documentation theme for Hugo
https://docuapi.netlify.app/
Other
750 stars 200 forks source link

Backslashes in code blocks are wrapped in <span> #47

Open eine opened 4 years ago

eine commented 4 years ago

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

bep commented 4 years ago

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.

alecthomas commented 4 years ago

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.

eine commented 4 years ago

I tried to:

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 commented 4 years ago

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...