-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Codehilite - hl_lines highlighting gets cut off when scrolling horizontally #452
Comments
Known bug and not fixable, I'm afraid. If someone comes up with a solution that doesn't break existing functionality, I'm happy to integrate it. |
Just surround the portion it with a fence with 1 back tick greater than you need:
To give some background, this issue was introduced when the clipboard copy icon was added to code blocks. Essentially the pre/code or div/code overflow CSS logic was reversed to make adding the clipboard icon easy and manageable. A lot of corner cases were tested for, but unfortunately, this one was overlooked. It is possible though that @squidfunk was aware of this and viewed it as a lesser evil. Since I've run into it, I personally have viewed it a s a lesser evil as I find the clipboard icon to be far more useful. I did try a number of fixes, but to get the edge to edge highlighting that Material is aiming for, My personal solution was just to set the styling to inline: https://github.com/facelessuser/pymdown-extensions/blob/master/docs/src/scss/_code.scss#L28. It will highlight all the text, but will not be edge to edge in the code block, but that was fine with me. The aesthetics aren't as good, but it is practical and works. You can play with padding to maybe reduce gaps between lines if that bothers you, but I personally didn't care enough. You can see an example by looking here and scrolling down the last example: http://facelessuser.github.io/pymdown-extensions/extensions/superfences/#nested-fences. |
Actually, it wasn't overlooked, I was fully aware. It worked before we restructured the HTML and CSS, but not on every browser, for example on iOS the behavior was the same as now. For this reason I just thought: what the heck. There are a lot of compromises in this theme due to the way the Markdown parser (or other extensions) generates the HTML, so this is one of them. |
Cool, I didn't notice it until after, but wasn't sure if you did :). |
Closing this, as it's not fixable as of today. |
Description
Codehilite - hl_lines highlighting gets cut off when scrolling horizontally
Expected behavior
Excepting Codehilite to highlight the entire row
Actual behavior
Steps to reproduce the bug
Note:
Sorry I can't seem to escape ``` properly in github, not sure how to do this- FIXED Thanks @faceslessuserPackage versions
Project configuration
System information
Irrelevant
The text was updated successfully, but these errors were encountered: