Dec. 5, 2010
9:37 p.m.
Hi paul I started to write some comments and more tests as well as writing a small Documentation. May be to be turned into a Help later. Now a question, I tried to write a comment for and I was wondering why not returning '' instead of nil in string. It will avoid to have isNil everywhere. I did not touch that code for now. string ^ (children size = 1 and: [(children at: 1) isString]) ifTrue: [(children at: 1) contents] ifFalse: [nil] testString | soup | soup := Soup fromString: '<b>foo</b>'. self assert: (soup b string = 'foo'). soup := Soup fromString: '<b>f<i>e</i>o</b>'. self assert: (soup b string) isNil Stef