Text.st
changeset 758 5dc694e5c8db
parent 756 43d8932d307a
child 759 3527d6b2fb6d
equal deleted inserted replaced
757:84c4c41ed23f 758:5dc694e5c8db
   566      a text object will be returned. Otherwise, a string (i.e. without emphasis)
   566      a text object will be returned. Otherwise, a string (i.e. without emphasis)
   567      is returned."
   567      is returned."
   568 
   568 
   569     |newRuns|
   569     |newRuns|
   570 
   570 
       
   571     aStringOrText isCharacter ifTrue:[
       
   572         ^ self , aStringOrText asString
       
   573     ].
   571     aStringOrText hasChangeOfEmphasis ifTrue:[    
   574     aStringOrText hasChangeOfEmphasis ifTrue:[    
   572         ^ self species new
   575         ^ self species new
   573             string:(string , aStringOrText)
   576             string:(string , aStringOrText)
   574             emphasisCollection:(runs , aStringOrText emphasisCollection)
   577             emphasisCollection:(runs , aStringOrText emphasisCollection)
   575     ].
   578     ].
  1233 ! !
  1236 ! !
  1234 
  1237 
  1235 !Text class methodsFor:'documentation'!
  1238 !Text class methodsFor:'documentation'!
  1236 
  1239 
  1237 version
  1240 version
  1238     ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.52 1999-06-29 18:38:57 cg Exp $'
  1241     ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.53 1999-07-05 12:42:15 cg Exp $'
  1239 ! !
  1242 ! !
  1240 Text initialize!
  1243 Text initialize!