Ticket #12719: 12719-preparse-magic.patch

File 12719-preparse-magic.patch, 728 bytes (added by jason, 9 years ago)
  • sage/misc/interpreter.py

    # HG changeset patch
    # User Jason Grout <jason.grout@drake.edu>
    # Date 1349921392 18000
    # Node ID 77a9809f8a917846d424ed93f19a44cfc6d88abc
    # Parent  e5b59fc698ab314e9568b7a5fb22528f2e5fde40
    Turn on the preparser, even for lines with magics.
    
    diff --git a/sage/misc/interpreter.py b/sage/misc/interpreter.py
    a b  
    235235            '2'
    236236            sage: preparser(True)
    237237        """
    238         if do_preparse and not line.startswith('%'):
     238        if do_preparse:
    239239            # we use preparse_file instead of just preparse because preparse_file
    240240            # automatically prepends attached files
    241241            return preparse(line, reset=(line_number==0))