def _tab_newline_replace(self,fromlines,tolines):
def expand_tabs(line):<EOL><INDENT>line = line.replace('<STR_LIT:U+0020>','<STR_LIT>')<EOL>line = line.expandtabs(self._tabsize)<EOL>line = line.replace('<STR_LIT:U+0020>','<STR_LIT:\t>')<EOL>return line.replace('<STR_LIT>','<STR_LIT:U+0020>').rstrip('<STR_LIT:\n>')<EOL><DEDENT>fromlines = [expand_tabs(line) for line in fromlines]<EOL>tolines = [expand_tabs(line) for line in tolines]<EOL>return fromlines,tolines<EOL>
Returns from/to line lists with tabs expanded and newlines removed.

        Instead of tab characters being replaced by the number of spaces
        needed to fill in to the next tab stop, this function will fill
        the space with tab characters.  This is done so that the difference
        algorithms can identify changes in a file when tabs are replaced by
        spaces and vice versa.  At the end of the HTML generation, the tab
        characters will be replaced with a nonbreakable space.