mirror of
https://github.com/enso-org/enso.git
synced 2024-11-25 21:25:20 +03:00
Full white space rendering and links fix (#11238)
This commit is contained in:
parent
c7cc5f0be0
commit
37621a9f90
@ -205,10 +205,6 @@ function formatText(params: ICellRendererParams) {
|
||||
.replaceAll('&', '&')
|
||||
.replaceAll('<', '<')
|
||||
.replaceAll('>', '>')
|
||||
.replace(
|
||||
/https?:\/\/([-()_.!~*';/?:@&=+$,A-Za-z0-9])+/g,
|
||||
(url: string) => `<a href="${url}" target="_blank" class="link">${url}</a>`,
|
||||
)
|
||||
|
||||
if (textFormatterSelected.value === 'off') {
|
||||
return htmlEscaped.replace(/^\s+|\s+$/g, ' ')
|
||||
@ -232,7 +228,12 @@ function formatText(params: ICellRendererParams) {
|
||||
return `<span style="color: #df8800">${match.replaceAll(' ', '·')}</span>`
|
||||
})
|
||||
|
||||
const replaceReturns = replaceSpaces.replace(
|
||||
const replaceLinks = replaceSpaces.replace(
|
||||
/https?:\/\/([-()_.!~*';/?:@&=+$,A-Za-z0-9])+/g,
|
||||
(url: string) => `<a href="${url}" target="_blank" class="link">${url}</a>`,
|
||||
)
|
||||
|
||||
const replaceReturns = replaceLinks.replace(
|
||||
/\r\n/g,
|
||||
'<span style="color: #df8800">␍␊</span> <br>',
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user