mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
Browsers render lines with just \0 chars as zero-height. Treat them as empty lines instead Implementing the suggestion raised in the issue discussion.
This commit is contained in:
@@ -537,7 +537,8 @@ export class Executor extends Pane<ExecutorState> {
|
|||||||
): JQuery<HTMLElement> {
|
): JQuery<HTMLElement> {
|
||||||
const outElem = $('<pre class="card execution-stdoutstderr"></pre>').appendTo(element);
|
const outElem = $('<pre class="card execution-stdoutstderr"></pre>').appendTo(element);
|
||||||
output.forEach(obj => {
|
output.forEach(obj => {
|
||||||
if (obj.text === '') {
|
// Bug #8152: output lines with only null characters should be rendered as empty lines
|
||||||
|
if (obj.text === '' || (obj.text.includes('\x00') && obj.text.replace(/\x00/g, '') === '')) {
|
||||||
this.addCompilerOutputLine('<br/>', outElem, undefined, undefined, false, null);
|
this.addCompilerOutputLine('<br/>', outElem, undefined, undefined, false, null);
|
||||||
} else {
|
} else {
|
||||||
const lineNumber = obj.tag ? obj.tag.line : obj.line;
|
const lineNumber = obj.tag ? obj.tag.line : obj.line;
|
||||||
|
|||||||
Reference in New Issue
Block a user