Revision: 18607
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18607
Author:   ianwill
Date:     2009-01-21 16:45:31 +0100 (Wed, 21 Jan 2009)

Log Message:
-----------
== Scripts ==

- Scripts Help Browser: error parsing doc info wrapped in triple single quotes, 
like done in the 3ds importer. Thanks Jean-Michel (jms) for informing me about 
it.

Modified Paths:
--------------
    trunk/blender/release/scripts/help_browser.py

Modified: trunk/blender/release/scripts/help_browser.py
===================================================================
--- trunk/blender/release/scripts/help_browser.py       2009-01-21 13:54:53 UTC 
(rev 18606)
+++ trunk/blender/release/scripts/help_browser.py       2009-01-21 15:45:31 UTC 
(rev 18607)
@@ -8,7 +8,7 @@
 """
 
 __author__ = "Willian P. Germano"
-__version__ = "0.2 01/11/09"
+__version__ = "0.3 01/21/09"
 __email__ = ('scripts', 'Author, wgermano:ig*com*br')
 __url__ = ('blender', 'blenderartists.org')
 
@@ -68,7 +68,8 @@
 # ***** END GPL LICENCE BLOCK *****
 # --------------------------------------------------------------------------
 # Thanks: Brendon Murphy (suggestion) and Kevin Morgan (implementation)
-# for the "run" button.
+# for the "run" button; Jean-Michel Soler for pointing a parsing error
+# with multilines using triple single quotes.
 
 import Blender
 from Blender import sys as bsys, Draw, Window, Registry
@@ -355,7 +356,12 @@
                        l = "ERROR"
 
        elif l[0] == "'":
-               if l[-1] == '\\':
+               if l[1:3] == "''": # '''
+                       if l.find("'''", 3) < 0: # multiline
+                               l2, i = parse_pyobj_close("'''", lines, i)
+                               if l[-1] == '\\': l = l[:-1]
+                               l = "%s%s" % (l, l2)
+               elif l[-1] == '\\':
                        l2, i = parse_pyobj_close("'", lines, i)
                        l = "%s%s" % (l, l2)
                elif l[-1] == "'" and l[-2] !=  '\\': # single line: '...'


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to