Skip to content

Commit 7ab2074

Browse files
committed
Fix: Default to 1 line
Issue #154
1 parent 75f87ae commit 7ab2074

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/ts/transformers/har-tabs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function makeContentTab(entry: Entry) {
129129
const escapedText = entry.response.content.text || "";
130130
const unescapedText = escapedText.replace(escapedNewLineRegex, "\n").replace(escapedTabRegex, "\t");
131131
const newLines = escapedText.match(newLineRegex);
132-
const lineCount = newLines ? newLines.length : 0;
132+
const lineCount = newLines ? newLines.length : 1;
133133
return makeLazyWaterfallEntryTab(
134134
`Content (${lineCount} Line${lineCount > 1 ? "s" : ""})`,
135135
() => `<pre><code>${escapeHtml(unescapedText)}</code></pre> `,

0 commit comments

Comments
 (0)