mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: do not cut kbd in tooltip
Co-authored-by: David Larlet <david@larlet.fr>
This commit is contained in:
parent
55babfde34
commit
e1272ec6cd
3 changed files with 6 additions and 1 deletions
|
@ -203,6 +203,10 @@ dt {
|
||||||
/* Various */
|
/* Various */
|
||||||
/* *********** */
|
/* *********** */
|
||||||
|
|
||||||
|
.nobr {
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
white-space: pre-line;
|
white-space: pre-line;
|
||||||
|
|
|
@ -196,7 +196,7 @@ export default class Help {
|
||||||
.split('+')
|
.split('+')
|
||||||
.map((el) => `<kbd>${el}</kbd>`)
|
.map((el) => `<kbd>${el}</kbd>`)
|
||||||
.join('+')
|
.join('+')
|
||||||
label += ` ${shortcut}`
|
label += ` <span class="nobr">${shortcut}</span>`
|
||||||
} else {
|
} else {
|
||||||
label += ` (${shortcut})`
|
label += ` (${shortcut})`
|
||||||
}
|
}
|
||||||
|
|
|
@ -126,6 +126,7 @@ export function escapeHTML(s) {
|
||||||
'frameborder',
|
'frameborder',
|
||||||
'scrolling',
|
'scrolling',
|
||||||
'controls',
|
'controls',
|
||||||
|
'class',
|
||||||
],
|
],
|
||||||
ALLOWED_ATTR: ['href', 'src', 'width', 'height', 'style', 'dir', 'title', 'type'],
|
ALLOWED_ATTR: ['href', 'src', 'width', 'height', 'style', 'dir', 'title', 'type'],
|
||||||
// Added: `geo:` URL scheme as defined in RFC5870:
|
// Added: `geo:` URL scheme as defined in RFC5870:
|
||||||
|
|
Loading…
Reference in a new issue