1
1
var assert = require ( 'assert' ) ;
2
- var Utils = require ( '../src/utils.js' ) . Utils ;
3
2
4
3
var LineByLinePrinter = require ( '../src/line-by-line-printer.js' ) . LineByLinePrinter ;
5
4
@@ -109,11 +108,11 @@ describe('LineByLinePrinter', function() {
109
108
assert . equal ( expected , fileHtml ) ;
110
109
} ) ;
111
110
112
- it ( 'should convert indents into non breakin spaces (one tab) ' , function ( ) {
111
+ it ( 'should preserve tabs ' , function ( ) {
113
112
var diffParser = require ( '../src/diff-parser.js' ) . DiffParser ;
114
113
var lineByLinePrinter = new LineByLinePrinter ( { } ) ;
115
114
var fileHtml = lineByLinePrinter . makeLineHtml ( false ,
116
- diffParser . LINE_TYPE . INSERTS , '' , 30 , Utils . escape ( '\ttest' ) , '+' ) ;
115
+ diffParser . LINE_TYPE . INSERTS , '' , 30 , '\ttest' , '+' ) ;
117
116
fileHtml = fileHtml . replace ( / \n \n + / g, '\n' ) ;
118
117
var expected = '<tr>\n' +
119
118
' <td class="d2h-code-linenumber d2h-ins">\n' +
@@ -124,7 +123,7 @@ describe('LineByLinePrinter', function() {
124
123
' <td class="d2h-ins">\n' +
125
124
' <div class="d2h-code-line d2h-ins">\n' +
126
125
' <span class="d2h-code-line-prefix">+</span>\n' +
127
- ' <span class="d2h-code-line-ctn"> test </span>\n' +
126
+ ' <span class="d2h-code-line-ctn">\ttest </span>\n' +
128
127
' </div>\n' +
129
128
' </td>\n' +
130
129
'</tr>' ;
0 commit comments