Ticket #638: sage-638_1.patch

File sage-638_1.patch, 969 bytes (added by TimothyClemans, 12 years ago)
  • sage/server/notebook/worksheet.py

    # HG changeset patch
    # User Timothy Clemans <timothy.clemans@gmail.com>
    # Date 1221114532 25200
    # Node ID db42e18dbae46999221a38fdeb4fd1f4cdaac69f
    # Parent  34dcba7f94e28b6fefd6564b0d06a5540c3b7397
    #638
    
    diff -r 34dcba7f94e2 -r db42e18dbae4 sage/server/notebook/worksheet.py
    a b  
    18211821        self.reset_interact_state()
    18221822       
    18231823        text.replace('\r\n','\n')
     1824        l = 0
     1825        comment = ''
     1826        text = text.split('\n')
     1827        for i, line in enumerate(text):
     1828            if '<!--' in line:
     1829                l = i
     1830                comment = line.strip()
     1831        text = '\n'.join(text[l + 1:])
    18241832        name, i = extract_name(text)
    18251833        self.set_name(name)
    1826         text = text[i:]
     1834        text = comment + text[i:]
    18271835
    18281836        system, i = extract_system(text)
    18291837        if system == "None":