fix: Side by side line spacing

Fixes https://github.com/rtfpessoa/diff2html/issues/251
This commit is contained in:
Rodrigo Fernandes 2019-12-22 17:35:29 +00:00
parent 67572dbea2
commit a047423f4e
No known key found for this signature in database
GPG key ID: 67157D2E3D4258B4
2 changed files with 5 additions and 3 deletions

View file

@ -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;

View file

@ -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>';