Report line-collapsed formatting
This commit is contained in:
parent
fa25bf3c5c
commit
32de0bdd56
@ -205,7 +205,7 @@
|
||||
id: 'OR_PN:' + time.getTime() + ':' + x[2],
|
||||
emblem: 'emblem-notes',
|
||||
title: [x[4], x[5], '#' + x[2]],
|
||||
detail: escape_html(x[6])
|
||||
detail: escape_html(collapse_lines(x[6]))
|
||||
};
|
||||
}),
|
||||
loader: reportloader_chunk,
|
||||
@ -412,6 +412,10 @@
|
||||
return fn;
|
||||
}
|
||||
|
||||
function collapse_lines(s) {
|
||||
return s.replace(/(\S)[^\S\r\n]+\r?\n([^\s\.,\/#!$%\^&\*;:=\-_`~])/g, '$1 $2').replace(/([\.,!;])\r?\n([^\s\.,\/#!$%\^&\*;:=\-_`~])/g, '$1 $2');
|
||||
}
|
||||
|
||||
const escape_div = document.createElement('div');
|
||||
function escape_html(s) {
|
||||
escape_div.textContent = s;
|
||||
|
Loading…
x
Reference in New Issue
Block a user