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

The <code> tag, when inline code with backticks, does not receive a background #89

Open
rockcavera opened this issue Feb 15, 2024 · 3 comments

Comments

@rockcavera
Copy link

All inline code with backticks is not being rendered with a background, which makes it difficult to distinguish an inline code from the rest of the text.

This problem occurs in all nimibook themes.

@pietroppeter
Copy link
Owner

Yes, it is a problem of nimib. Nim code in nbCode or similar blocks is statically highlighted and receive the different background from highlight.js default theme. The code in markdown is not statically highlighted and highlight.js theme is not applied. I think there should be an issue in nimib related to this (currently on mobile and hard to find it).

@rockcavera
Copy link
Author

From the research I did, adding class="hljs", in the <code> tags, of the inline code, would solve the problem.

However, in a quick look at the nimibook code, I saw that the rendering is all delegated to nimib. I haven't seen the nimib code yet, but I believe that the change cannot be made there, as it will disrupt the nimib library.

@pietroppeter
Copy link
Owner

Yes adding that class would trigger the highlighting through css. The change should be indeed made in nimib. Nimibook is not responsible for collecting multiple nimib documents in a single static site with a predefined theme (from mdbook)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants