lineStyles attached to line children and missing line numbers
See original GitHub issueI have as you can see, in the picture, a problem with the lineStyles. At first, they are attached to the child spans, with this I have the problem that I get unexpected line breaks. Probably are this line breaks also the problem why the line numbers break up on line 40 (I used the line numbers just for be debugging purposes). I load the code via redux-sagas and bind them then like this:
<SyntaxHighlighter
language='java'
wrapLines
lineStyle={(lineNumber: number) => {
const style = { display: '', backgroundColor: '' };
if (this.state.fileCoverage.COVERED.includes(lineNumber)) {
style.display = 'block';
style.backgroundColor = '#A9DBB8';
} else if (this.state.fileCoverage.COVERED_NEW.includes(lineNumber)) {
style.display = 'block';
style.backgroundColor = '#EDE4AF';
} else if (this.state.fileCoverage.UNCOVERED.includes(lineNumber)) {
style.display = 'block';
style.backgroundColor = '#BA2D0B';
}
return style;
}}
showLineNumbers
>
{this.props.codeFile}
</SyntaxHighlighter>
Thanks
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
Linestyles — Matplotlib 3.6.2 documentation
Simple linestyles can be defined using the strings "solid", "dotted", "dashed" or "dashdot". More refined control can be achieved by providing a dash...
Read more >Options for connecting points with lines - Stata
The connect options specify how points on a graph are to be connected. In certain contexts (for example, scatter; see [G-2] graph twoway...
Read more >Line Style Editor Dialog - Bentley - Product Documentation
Lists the names of all line styles in the open line style library. Selecting a name causes a sample of the line style...
Read more >Linestyles in Matplotlib Python - GeeksforGeeks
Display plot. Below are various programs to depict various line styles available in matplotlib module: Example 1: Program to depict dotted line ......
Read more >Line Styles | Revit 2020 - Autodesk Knowledge Network
Line styles are used to indicate different effects, such as a dashed (------) line for reference planes.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@conorhastings Thank you very much, it works perfect 👍
@KirioXX no problem, thanks again for the great report
Sorry it took so long to get to