11var assert = require ( 'assert' ) ;
2- var Utils = require ( '../src/utils.js' ) . Utils ;
32
43var LineByLinePrinter = require ( '../src/line-by-line-printer.js' ) . LineByLinePrinter ;
54
@@ -109,11 +108,11 @@ describe('LineByLinePrinter', function() {
109108 assert . equal ( expected , fileHtml ) ;
110109 } ) ;
111110
112- it ( 'should convert indents into non breakin spaces (one tab) ' , function ( ) {
111+ it ( 'should preserve tabs ' , function ( ) {
113112 var diffParser = require ( '../src/diff-parser.js' ) . DiffParser ;
114113 var lineByLinePrinter = new LineByLinePrinter ( { } ) ;
115114 var fileHtml = lineByLinePrinter . makeLineHtml ( false ,
116- diffParser . LINE_TYPE . INSERTS , '' , 30 , Utils . escape ( '\ttest' ) , '+' ) ;
115+ diffParser . LINE_TYPE . INSERTS , '' , 30 , '\ttest' , '+' ) ;
117116 fileHtml = fileHtml . replace ( / \n \n + / g, '\n' ) ;
118117 var expected = '<tr>\n' +
119118 ' <td class="d2h-code-linenumber d2h-ins">\n' +
@@ -124,7 +123,7 @@ describe('LineByLinePrinter', function() {
124123 ' <td class="d2h-ins">\n' +
125124 ' <div class="d2h-code-line d2h-ins">\n' +
126125 ' <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' +
128127 ' </div>\n' +
129128 ' </td>\n' +
130129 '</tr>' ;
0 commit comments