Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark mode breaks highlighting lines in code blocks #3084

Open
thomwiggers opened this issue Apr 3, 2024 · 3 comments
Open

Dark mode breaks highlighting lines in code blocks #3084

thomwiggers opened this issue Apr 3, 2024 · 3 comments

Comments

@thomwiggers
Copy link
Contributor

thomwiggers commented Apr 3, 2024

Description

I use the hl_lines feature of Hugo to highlight some lines in a code block:

Code:

```Makefile {linenos=table, hl_lines="1 3-5"}
all: mag.pdf fog.pdf prohibited.pdf unicorn.pdf detective.pdf

%.pdf: generator.tex
	lualatex -jobname='$(subst .pdf,,$@)' \
		'\def\theemoji{$(subst .pdf,,$@)}\input{generator.tex}'
```

Output:
image

But in dark mode this becomes unreadable:

image

Reproduction Link

https://github.com/thomwiggers/thomwiggers.nl/blob/main/content/post/emoji-in-latex/index.md

Rendered at https://thomwiggers.nl/post/emoji-in-latex/

What Hugo Module versions does your site use?

require (
	github.com/HugoBlox/hugo-blox-builder/modules/blox-bootstrap/v5 v5.9.7 // indirect
	github.com/HugoBlox/hugo-blox-builder/modules/blox-core v0.3.1 // indirect
	github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.1 // indirect
	github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-reveal v1.1.2 // indirect
	github.com/HugoBlox/hugo-blox-builder/modules/blox-seo v0.2.2 // indirect
)

What operating system(s) are you seeing the problem on?

macOS, Linux

What browser(s) are you seeing the problem on?

Chrome, Safari

Which Hugo Blox template are you using?

Academic CV

What version of Hugo are you using?

v0.124.1

@gcushen
Copy link
Collaborator

gcushen commented Apr 27, 2024

@thomwiggers It may have been due to a Hugo bug when the style was generated with Hugo's 'chromastyles' command? gohugoio/hugo#12393

Copy link

This issue is stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the main branch, consider contributing a Pull Request with a fix.

If this is a feature request, and you feel that it is still relevant and valuable, consider contributing a Pull Request for review.

This issue will automatically close soon if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 28, 2024
@thomwiggers
Copy link
Contributor Author

we should probably check if the highlight styles need to be recreated, e.g.,

https://github.com/HugoBlox/hugo-blox-builder/blob/main/modules/blox-bootstrap/assets/css/libs/chroma/github-dark.css

@github-actions github-actions bot removed the stale label May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants