question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lineStyles attached to line children and missing line numbers

See original GitHub issue

screen shot 2017-05-25 at 14 17 28

I 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:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
KirioXXcommented, May 30, 2017

@conorhastings Thank you very much, it works perfect 👍

0reactions
conorhastingscommented, May 30, 2017

@KirioXX no problem, thanks again for the great report

Sorry it took so long to get to

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found