Et2Description: Fix extra space while preserving line breaks

This commit is contained in:
nathan 2022-04-21 10:41:30 -06:00
parent e73fe68384
commit 166db3f4d2

View File

@ -22,8 +22,8 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
return [ return [
...super.styles, ...super.styles,
css` css`
:host { * {
white-space: pre-line; white-space: pre-wrap;
} }
:host a { :host a {
cursor: pointer; cursor: pointer;
@ -163,8 +163,10 @@ export class Et2Description extends Et2Widget(LitElement) implements et2_IDetach
render() render()
{ {
return html` // Turn off IDE reformatting, or it will add an extra line break into the template
<slot></slot>`; // @formatter:off
return html`<slot></slot>`;
// @formatter:on
} }