--- a/SyntaxHighlighter.st Thu Apr 02 19:10:27 1998 +0200
+++ b/SyntaxHighlighter.st Fri Apr 03 19:29:00 1998 +0200
@@ -52,7 +52,7 @@
formatMethod:aString in:aClass
"format a method in a given class."
- |parser tree text|
+ |parser tree text endPos|
aString isNil ifTrue:[^ nil].
@@ -67,8 +67,11 @@
"/ emphasizeFrom:(parser sourceStream position)
"/ to:text size
"/ with:(#color->Color red).
- ^ (text copyTo:(parser sourceStream position))
- , (aString copyFrom:(parser sourceStream position+1))
+ endPos := parser sourceStream position.
+ endPos >= text size ifTrue:[
+ ^ text
+ ].
+ ^ (text copyTo:endPos) , (aString copyFrom:(endPos+1))
"/ ^ text "/ aString
].
@@ -84,7 +87,7 @@
in:UndefinedObject
"
- "Modified: / 2.4.1998 / 10:47:27 / cg"
+ "Modified: / 3.4.1998 / 17:13:52 / cg"
! !
!SyntaxHighlighter methodsFor:'accessing'!
@@ -331,5 +334,5 @@
!SyntaxHighlighter class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/SyntaxHighlighter.st,v 1.7 1998-04-02 08:48:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/SyntaxHighlighter.st,v 1.8 1998-04-03 17:29:00 cg Exp $'
! !