[squeak-dev] The Trunk: Collections-mt.703.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 2 08:05:57 UTC 2016


Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.703.mcz

==================== Summary ====================

Name: Collections-mt.703
Author: mt
Time: 2 August 2016, 10:05:41.089882 am
UUID: 32b3f850-392c-9a4d-b0cb-7e1ed37c9bc6
Ancestors: Collections-mt.702

Small fix for SWiki HTML parsing. Recognize also non-hash color names. Our Color class is fine with it, too.

=============== Diff against Collections-mt.702 ===============

Item was changed:
  ----- Method: HtmlReadWriter>>mapFontTag: (in category 'mapping') -----
  mapFontTag: aTag
  
  	| result colorStartIndex colorStopIndex attribute |
  	result := OrderedCollection new.
  	
+ 	"<font color=""#00FFCC""> or <font color=""green"">"
- 	"<font color=""#00FFCC"">"
  	attribute := 'color'.
  	colorStartIndex := aTag findString: attribute.
  	colorStartIndex > 0 ifTrue: [
+ 		colorStartIndex := aTag findString: '"' startingAt: colorStartIndex+attribute size.		
- 		colorStartIndex := aTag findString: '#' startingAt: colorStartIndex+attribute size.
  		colorStopIndex := aTag findString: '"' startingAt: colorStartIndex+1.
  		result add: (TextColor color:
+ 			(Color fromString: (aTag copyFrom: colorStartIndex+1 to: colorStopIndex-1)))].
+ 
- 			(Color fromString: (aTag copyFrom: colorStartIndex to: colorStopIndex-1)))].
- 	
  	^ result!



More information about the Squeak-dev mailing list