def _line_wrapper(self,diffs):
        """Returns iterator that splits (wraps) mdiff text lines"""

        # pull from/to data and flags from mdiff iterator
        for fromdata,todata,flag in diffs:
            # check for context separators and pass them through
            if flag is None:
                yield fromdata,todata,flag
                continue
            (fromline,fromtext),(toline,totext) = fromdata,todata
            # for each from/to line split it at the wrap column to form
            # list of text lines.
            fromlist,tolist = [],[]
            self._split_line(fromlist,fromline,fromtext)
            self._split_line(tolist,toline,totext)
            # yield from/to line in pairs inserting blank lines as
            # necessary when one side has more wrapped lines
            while fromlist or tolist:
                if fromlist:
                    fromdata = fromlist.pop(0)
                else:
                    fromdata = ('',' ')
                if tolist:
                    todata = tolist.pop(0)
                else:
                    todata = ('',' ')
                yield fromdata,todata,flag
def _line_wrapper(self,diffs):
        """Returns iterator that splits (wraps) mdiff text lines"""

        # pull from/to data and flags from mdiff iterator
        for fromdata,todata,flag in diffs:
            # check for context separators and pass them through
            if flag is None:
                yield fromdata,todata,flag
                continue
            (fromline,fromtext),(toline,totext) = fromdata,todata
            # for each from/to line split it at the wrap column to form
            # list of text lines.
            fromlist,tolist = [],[]
            self._split_line(fromlist,fromline,fromtext)
            self._split_line(tolist,toline,totext)
            # yield from/to line in pairs inserting blank lines as
            # necessary when one side has more wrapped lines
            while fromlist or tolist:
                if fromlist:
                    fromdata = fromlist.pop(0)
                else:
                    fromdata = ('',' ')
                if tolist:
                    todata = tolist.pop(0)
                else:
                    todata = ('',' ')
                yield fromdata,todata,flag
def _line_wrapper ( self , diffs ) : # pull from/to data and flags from mdiff iterator for fromdata , todata , flag in diffs : # check for context separators and pass them through if flag is None : yield fromdata , todata , flag continue ( fromline , fromtext ) , ( toline , totext ) = fromdata , todata # for each from/to line split it at the wrap column to form # list of text lines. fromlist , tolist = [ ] , [ ] self . _split_line ( fromlist , fromline , fromtext ) self . _split_line ( tolist , toline , totext ) # yield from/to line in pairs inserting blank lines as # necessary when one side has more wrapped lines while fromlist or tolist : if fromlist : fromdata = fromlist . pop ( 0 ) else : fromdata = ( '' , ' ' ) if tolist : todata = tolist . pop ( 0 ) else : todata = ( '' , ' ' ) yield fromdata , todata , flag
Returns iterator that splits (wraps) mdiff text lines
Returns iterator that splits ( wraps ) mdiff text lines