Changeset 852

Show
Ignore:
Timestamp:
09/17/05 16:02:09 (3 years ago)
Author:
tzanko
Message:

Fixed ticket #36

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • nbshell/trunk/ChangeLog

    r850 r852  
     12005-09-18  Tzanko Matev  <tsanko@gmail.com> 
     2 
     3    * Sheet.py (Sheet._update_celllist): Fixed two bugs in the xml to 
     4    nbshell blocks converter, one of which was ticket #36 
     5 
     6     
    172005-09-17  Tzanko Matev  <tsanko@gmail.com> 
    28 
  • nbshell/trunk/nbshell/PlainTextPlugin.py

    r850 r852  
    339339        self.StyleSetSpec(stc.STC_STYLE_LINENUMBER, "back:#E0C0C0") 
    340340 
    341         self.SetKeyWords(0,'para title section') 
     341        #self.SetKeyWords(0,' '.join(['para', 'title', 'section', 'code', 
     342        #                             'ipython-figure', 'ipython-block',  
     343        #                             'ipython-inlineequation'])) 
    342344         
    343345        stc.EVT_STC_MODIFIED(self, id, self.OnModified) 
  • nbshell/trunk/nbshell/Sheet.py

    r850 r852  
    256256                child = children.next() 
    257257            except StopIteration: 
    258                 #The sheet is empty. Create one empty xml block 
    259                 self.InsertCell('plaintext', update = False, text = '') 
     258                pass 
    260259            else: 
    261260                while True: 
     
    293292                            #matchers returned false. 
    294293                            elem_list = [] 
     294                            flag = False  
    295295                            while result: 
    296296                                elem_list.append(child) 
     
    298298                                    child = children.next() 
    299299                                except StopIteration: 
     300                                    flag = True 
    300301                                    break 
     302                                 
    301303                                result = result(child) 
    302304                             
     
    304306                            self.InsertCell(plugin_string, update = False, 
    305307                                           element_list = elem_list) 
     308                            if flag: 
     309                                break 
    306310                        else:  
    307311                            #This is a simple match, create the block, giving the 
     
    320324        #Run the function with the sheet element, and empty the buffer at the end 
    321325        process_element(self.element) 
    322         if buffer.tell() != read_pos[0]
     326        if buffer.tell() != read_pos[0] or not self.celllist
    323327            buffer.seek(read_pos[0]) 
    324328            self.InsertCell('plaintext', update = False, text = buffer.read())