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 Highlighting Doesn't Work Properly on Desktop Browsers #29

Closed
2 tasks done
zigmd opened this issue Aug 24, 2023 · 3 comments
Closed
2 tasks done

Code Highlighting Doesn't Work Properly on Desktop Browsers #29

zigmd opened this issue Aug 24, 2023 · 3 comments

Comments

@zigmd
Copy link

zigmd commented Aug 24, 2023

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for support

Describe the bug

Code blocks containing highlighted lines don't render on desktop browsers. I've tested this with Firefox and Chrome (without addons and also in private mode).

Additionally, if a wide code block is viewed on a smaller screen, horizontal scrollbar appears between the code text and code margin.

It works properly in mobile browsers.

Example this link renders differently on desktop and mobile.

The website is deployed on an NGINX server. Except for the automatic LetsEncrypt setup, the config file is at a bare minimum (happy to share if needed).

Expected behavior

  • Code blocks to be highlighted on desktop browsers.

  • Horizontal lines to appear at the margin instead of above it.

Screenshots

Desktop browsers will smaller screen:

horizontal_scrollbar_2

Desktop browsers will smaller screen:

horizontal_scrollbar_1

Common to all desktop browsers

code_not_highlighted

Environment

No response

@zigmd zigmd changed the title Code Highlighting Doesn't Work Properly on Desktop Code Highlighting Doesn't Work Properly on Desktop Browsers Aug 24, 2023
@colinwilson
Copy link
Owner

I think this is your NGINX config. Checking Chrome/Firefox dev tools shows many mixed content warnings for the .js files needed for highlighting to function. NGINX is trying to load them over http://

@colinwilson
Copy link
Owner

I think that's also what's causing your code blocks to render incorrectly

@zigmd
Copy link
Author

zigmd commented Aug 24, 2023

Thanks @colinwilson !
I've updated the NGINX config to allow only HTTPS and things are working consistently across devices.

@zigmd zigmd closed this as completed Aug 24, 2023
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