You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using wrapLongLines and showLineNumbers together overwrites the display property of the style attribute from lineProps.
To Reproduce
<SyntaxHighlighter
{...}
wrapLongLines
showLineNumbers
lineProps={(lineNumber) => ({
style: {
display: 'none', // In my case this is done conditionally, but this gets the point across
}
})}
>
{code}
</SyntaxHighlighter>
Expected behavior
In the above example the lines have the display: flex property, no matter what I set it to in lineProps. I'd expect it to take any value (maybe a warning in dev mode is warranted since it's expected to work with flexbox internally.)
Screenshots
Not relevant.
Desktop (please complete the following information):
OS: macOS, Win10
Browser: Chrome
Version: 112
Additional context
To me it looks like this line is the culprit. I've worked it around by setting height: 0; overflow: hidden to "mimic" display: none, but I've spent more time than I would dare to admit on finding out why my styles are not getting registered.
The text was updated successfully, but these errors were encountered:
Describe the bug
Using
wrapLongLines
andshowLineNumbers
together overwrites thedisplay
property of thestyle
attribute fromlineProps
.To Reproduce
Expected behavior
In the above example the lines have the
display: flex
property, no matter what I set it to inlineProps
. I'd expect it to take any value (maybe a warning in dev mode is warranted since it's expected to work with flexbox internally.)Screenshots
Not relevant.
Desktop (please complete the following information):
Additional context
To me it looks like this line is the culprit. I've worked it around by setting
height: 0; overflow: hidden
to "mimic"display: none
, but I've spent more time than I would dare to admit on finding out why my styles are not getting registered.The text was updated successfully, but these errors were encountered: