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.

Each line wrapped in a div?

See original GitHub issue

Would it make sense to wrap each line in a div? My use case is that I’ll be using this to highlight code coverage, so I’d like to have some lines with a different background color than other lines. I think this could also be useful for allowing people to highlight line ranges or click on the line number gutter to link to lines of code, like how GitHub does in source view.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
bmathewscommented, Dec 10, 2016
0reactions
conorhastingscommented, Feb 13, 2017

@ben174 just published v 5.0.0 which enables this with a wrapLines prop, if using wrapLines can use a lineStyle prop as either object, or function that recives line number to style individual lines.

You can see an example here

Read more comments on GitHub >

github_iconTop Results From Across the Web

overflow-wrap | CSS-Tricks
The overflow-wrap property in CSS allows you to specify that the browser can break a line of text inside the targeted element onto...
Read more >
Wrapping and breaking text - CSS: Cascading Style Sheets
This property will break a word once it is too long to fit on a line by itself. Note: The overflow-wrap property acts...
Read more >
How to Wrap Words in a <div> Tag with CSS - W3docs
If you've faced the situation when you need to wrap words in a <div>, you can use the white-space property with the "pre-wrap"...
Read more >
Is there a way to word-wrap long words in a div?
As david mentions, DIVs do wrap words by default. If you are referring to really long strings of text ...
Read more >
Wrap with Abbreviation - Emmet Documentation
Wrap with Abbreviation. A very powerful tool of the Emmet toolkit. It takes an abbreviation, expands it and places currently selected content in...
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