On Aug 20, 4:51 pm, "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 20, 2008 at 12:36 AM, zpcspm <[EMAIL PROTECTED]> wrote: > > I've got one more test where a section reference is involved. > > > This is the body of the @test node: > > ... > head = '<< xxx >>' > ... > > Try this: > > head = g.angleBrackets(' xxx ') > > This is the recommend way to avoid unwanted section references. > > Edward
Excellent! This is a working example: --- cut here --- root = p.copy() while p.hasChildren(): p.firstChild().doDelete(newNode = None) try: p1 = p.insertAsLastChild() g.pr(p1.headString()) head = 'head' p1.setHeadString(head) g.pr(p1.headString()) head = g.angleBrackets(' xxx ') p1.setHeadString(head) g.pr(p1.headString()) assert p1.headString() == g.angleBrackets(' xxx ') finally: if 1: while root.hasChildren(): root.firstChild().doDelete(newNode = None) c.redraw_now() --- cut here --- I strogly suggest to add this special case to docs. Possible places for addition are http://webpages.charter.net/edreamleo/scripting.html#getting-and-setting-headline-and-body-text and http://webpages.charter.net/edreamleo/intro.html#quick-start-for-programmers . It looks like the whole leo/doc/html directory contains 0 references to g.angleBrackets(). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---