Text.st
changeset 408 90799280d574
parent 407 a6e616d1d1bc
child 409 7e8c2457d5f3
--- a/Text.st	Thu Jul 11 10:12:14 1996 +0200
+++ b/Text.st	Thu Jul 11 13:23:28 1996 +0200
@@ -515,12 +515,16 @@
      a text object will be returned. Otherwise, a string (i.e. without emphasis)
      is returned."
 
-    (aStringOrText hasChangeOfEmphasis 
-    or:[self hasChangeOfEmphasis]) ifTrue:[
+    aStringOrText hasChangeOfEmphasis ifTrue:[
         ^ self species new
             string:(string , aStringOrText)
             emphasisCollection:(runs , aStringOrText emphasisCollection)
     ].
+    runs notNil "self hasChangeOfEmphasis" ifTrue:[
+        ^ self species new
+            string:(string , aStringOrText)
+            emphasisCollection:(runs copy add:nil withOccurrences:(aStringOrText size); yourself)
+    ].
     ^ string , aStringOrText string
 
     "
@@ -530,7 +534,7 @@
      ('hello' asText allBold) , (' world' asText allBold)
     "
 
-    "Modified: 16.5.1996 / 11:17:40 / cg"
+    "Modified: 11.7.1996 / 13:22:39 / cg"
 !
 
 concatenateFromString:aString
@@ -1122,6 +1126,6 @@
 !Text  class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.24 1996-07-11 08:12:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic2/Text.st,v 1.25 1996-07-11 11:23:28 cg Exp $'
 ! !
 Text initialize!