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> blocks get hyphens inserted sometimes #250

Open
2 tasks done
spollard opened this issue Nov 10, 2023 · 2 comments
Open
2 tasks done

<code> blocks get hyphens inserted sometimes #250

spollard opened this issue Nov 10, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@spollard
Copy link

spollard commented Nov 10, 2023

Thanks in advance for your bug report!

  • Have you reproduced this issue in incognito/private browsing?
  • Have you made sure you issue doesn't already exist?

Where is the URL that this occurs?

https://pulsar-edit.dev/docs/launch-manual/sections/behind-pulsar/#reading-config-settings

What's your issue?

Some of the code elements get split across lines and hyphens inserted in them, which breaks the code. I noticed it with the atom.config.get right before the first code block in https://pulsar-edit.dev/docs/launch-manual/sections/behind-pulsar/#reading-config-settings .

Which OS/Browser/Version does this happen on?

Debian 12
Firefox 115

Steps to Reproduce/Additional Details:

When you visit https://pulsar-edit.dev/docs/launch-manual/sections/behind-pulsar/#reading-config-settings at a width of 1146px (at least on my linux firefox), some of the code elements get split across lines and hyphens inserted in them, which breaks the code. I noticed it with the atom.config.get right before the first code block in that section.

Hyphenation is set in this CSS selector
.theme-hope-content:not(.custom) > p, .theme-hope-content:not(.custom) > ul p, .theme-hope-content:not(.custom) > ol p {
hyphens: auto;
}

And I hacked a fix like so

code {
hyphens: none;
}

@spollard spollard added the bug Something isn't working label Nov 10, 2023
@Daeraxa
Copy link
Member

Daeraxa commented Nov 11, 2023

Thanks for reporting this, this should be pretty easy to overwrite on the theme.

@confused-Techie
Copy link
Member

Thanks a ton for reporting this!

Seems there are protections for the code blocks themselves at least:

pre[class*-language-]>code {
  hyphens: none;
  -webkit-hyphens: none;
}

But seems those same protections were not considered for inline code blocks. Appreciate you contributing!

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

No branches or pull requests

3 participants