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

Code block file names clash with invalid language specifiers #282

Closed
jonasreiher opened this issue Feb 8, 2024 · 1 comment · Fixed by #297
Closed

Code block file names clash with invalid language specifiers #282

jonasreiher opened this issue Feb 8, 2024 · 1 comment · Fixed by #297
Labels
bug Something isn't working
Milestone

Comments

@jonasreiher
Copy link

Description

When using a valid language specifier in a code block, file names are displayed correctly. With invalid language specifiers, they overlap with the code content.

Steps To Reproduce

  1. Put this code block in your markdown, with an invalid language specifier xyz:
```xyz {filename="test.md"}
Hello
```
  1. It renders like this:
    image

  2. Use a valid language specifier instead, e.g. txt:

```txt {filename="test.md"}
Hello
```
  1. It renders correctly like this:
    image

Expected Behavior

Render the filename correctly above the code even if the language specifier is mistyped. The wrong language specifier should only affect syntax highlighting.

Environment

  • Hugo Version: v0.122.0-extended
  • Browser/OS: Safari + Firefox, MacOS
  • Theme Version: v0.7.1
@imfing imfing added the bug Something isn't working label Feb 8, 2024
@imfing
Copy link
Owner

imfing commented Feb 8, 2024

Thank you! Looks like a CSS issue, will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants