1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-23 17:51:56 +02:00

Avoid LF, \t, multiple spaces on timeline (#735)

This commit is contained in:
erikn69
2025-02-20 14:17:09 -05:00
committed by GitHub
parent 54be1a2e89
commit 9d43aa42b1

View File

@@ -526,7 +526,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
width: width + "%"
}));
m.append($('<span />').addClass(csscls('label'))
.text(measure.label + ( measure.duration ? " (" + measure.duration_str +(measure.memory ? '/' + measure.memory_str: '') + ")" : "")));
.text(measure.label.replace(/\s+/g, ' ') + ( measure.duration ? " (" + measure.duration_str +(measure.memory ? '/' + measure.memory_str: '') + ")" : "")));
if (measure.collector) {
$('<span />').addClass(csscls('collector')).text(measure.collector).appendTo(m);
@@ -573,7 +573,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
width = Math.min((aggregate.data.duration * 100 / data.duration).toFixed(2), 100);
aggregateTable.append('<tr><td class="' + csscls('name') + '">' +
aggregate.data.count + ' x ' + $('<i />').text(aggregate.label).html() + ' (' + width + '%)</td><td class="' + csscls('value') + '">' +
aggregate.data.count + ' x ' + $('<i />').text(aggregate.label.replace(/\s+/g, ' ')).html() + ' (' + width + '%)</td><td class="' + csscls('value') + '">' +
'<div class="' + csscls('measure') +'">' +
'<span class="' + csscls('value') + '"></span>' +
'<span class="' + csscls('label') + '">' + formatDuration(aggregate.data.duration) + (aggregate.data.memory ? '/' + formatBytes(aggregate.data.memory) : '') + '</span>' +