Skip to content

Commit

Permalink
Fix: Default to 1 line
Browse files Browse the repository at this point in the history
Issue #154
  • Loading branch information
micmro committed May 27, 2019
1 parent 75f87ae commit 7ab2074
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ts/transformers/har-tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function makeContentTab(entry: Entry) {
const escapedText = entry.response.content.text || "";
const unescapedText = escapedText.replace(escapedNewLineRegex, "\n").replace(escapedTabRegex, "\t");
const newLines = escapedText.match(newLineRegex);
const lineCount = newLines ? newLines.length : 0;
const lineCount = newLines ? newLines.length : 1;
return makeLazyWaterfallEntryTab(
`Content (${lineCount} Line${lineCount > 1 ? "s" : ""})`,
() => `<pre><code>${escapeHtml(unescapedText)}</code></pre> `,
Expand Down

0 comments on commit 7ab2074

Please sign in to comment.