react-truncate
react-truncate copied to clipboard
<br> tags being added to truncated lines
Hi, any way of turning off the generation of
tags inside the truncated text?
Checked the docs but doesn't seem clear.
Yes, I have such issue too. And it break all view. I resolve it by br: display none, but it isn’t good. Need add space for after span - bad hack
+1 Same issue ...
+1 Any update on this one yet?
- 1 same issue.
+1 here I guess the problem is here:
renderLine(line, i, arr) {
if (i === arr.length - 1) {
return <span key={i}>{line}</span>;
} else {
const br = <br key={i + 'br'} />;
if (line) {
return [
<span key={i}>{line}</span>,
br
];
} else {
return br;
}
}
}
@pablosichert Same issue. Any updates on this?
Still the case, would love an update
+1 same issue. br tag is injected at random places and using display: none with margin to the span messes up the text