Skip to content

Commit

Permalink
Merge pull request #252 from rtfpessoa/fix-side-diff-space
Browse files Browse the repository at this point in the history
fix: Side by side line spacing
  • Loading branch information
rtfpessoa authored Dec 22, 2019
2 parents 67572db + a047423 commit fa3f785
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/side-by-side-printer.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,9 @@
lineClass += ' d2h-code-side-emptyplaceholder';
contentClass += ' d2h-code-side-emptyplaceholder';
type += ' d2h-emptyplaceholder';
}

if (!prefix) {
prefix = ' ';
lineWithoutPrefix = ' ';
} else if (!prefix) {
var lineWithPrefix = printerUtils.separatePrefix(isCombined, content);
prefix = lineWithPrefix.prefix;
lineWithoutPrefix = lineWithPrefix.line;
Expand Down
2 changes: 2 additions & 0 deletions test/side-by-side-printer-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ describe('SideBySidePrinter', function() {
' </td>\n' +
' <td class="d2h-cntx d2h-emptyplaceholder">\n' +
' <div class="d2h-code-side-line d2h-code-side-emptyplaceholder d2h-cntx d2h-emptyplaceholder">\n' +
' <span class="d2h-code-line-prefix">&nbsp;</span>\n' +
' <span class="d2h-code-line-ctn">&nbsp;</span>\n' +
' </div>\n' +
' </td>\n' +
'</tr>';
Expand Down

0 comments on commit fa3f785

Please sign in to comment.