Django

Code

Changeset 1403

Show
Ignore:
Timestamp:
11/24/05 16:57:04 (3 years ago)
Author:
hugo
Message:

small fix to the template_debug stuff, it was dropping last characters and didn't split the first line correctly

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/views/debug.py

    r1400 r1403  
    2424    source_lines = [] 
    2525    linebreaks = izip(count(0), linebreak_iter(template_source)) 
    26     linebreaks.next() # skip the nothing before initial line start 
    2726    for num, next in linebreaks: 
    2827        if start >= upto and end <= next: 
     
    3029            before = escape(template_source[upto:start]) 
    3130            during = escape(template_source[start:end]) 
    32             after = escape(template_source[end:next - 1]) 
    33         source_lines.append( (num, escape(template_source[upto:next - 1])) ) 
     31            after = escape(template_source[end:next]) 
     32        source_lines.append( (num, escape(template_source[upto:next])) ) 
    3433        upto = next 
    3534    total = len(source_lines)