mirror of
https://github.com/enso-org/enso.git
synced 2024-11-25 02:35:04 +03:00
Full white space rendering and links fix (#11238)
(cherry picked from commit 37621a9f90
)
This commit is contained in:
parent
4d92448566
commit
ff45b85f9c
@ -218,10 +218,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 === TextFormatOptions.Off) {
|
||||
return htmlEscaped.replace(/^\s+|\s+$/g, ' ')
|
||||
@ -245,7 +241,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