Et2Link: If only breaking on a certain character, don't break on dash either (in addition to space)

This commit is contained in:
nathan 2023-06-01 09:19:05 -06:00
parent 8e0a3a2755
commit 2eeff5ca38

View File

@ -195,7 +195,9 @@ export class Et2Link extends ExposeMixin<Et2Widget>(Et2Widget(LitElement)) imple
// zero-width space after the break string
title = title
.replace(this.breakTitle, this.breakTitle.trimEnd() + "\u200B")
.replace(/ /g, '\u00a0');
.replace(/ /g, '\u00a0')
// Change hyphen to non-breaking hyphen
.replace(/-/g, '');
}
return html`
<div part="base" class="link et2_link" draggable="${this.app == 'file'}" @dragstart=${this._handleDragStart.bind(this, this.dataset)}>