The Trunk: Collections-mt.795.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Collections-mt.795.mcz

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

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

Name: Collections-mt.795
Author: mt
Time: 17 May 2018, 8:08:41.389712 am
UUID: ce581475-faa1-3446-978c-84ef85a10d63
Ancestors: Collections-nice.794

Fixes an endless-loop bug as well as adds support for hrefs without quotes in the HtmlReadWriter.

=============== Diff against Collections-nice.794 ===============

Item was changed:
  ----- Method: HtmlReadWriter>>mapATag: (in category 'mapping') -----
  mapATag: aTag
 
  | result startIndex stopIndex attribute |
  result := OrderedCollection new.
 
  "<a href=""http://google.de"">"
  attribute := 'href'.
  startIndex := aTag findString: attribute.
  startIndex > 0 ifTrue: [
  startIndex := aTag findString: '"' startingAt: startIndex+attribute size.
+ startIndex > 0
+ ifTrue: [stopIndex := aTag findString: '"' startingAt: startIndex+1]
+ ifFalse: [
+ "URLs without quotes..."
+ startIndex := aTag findString: '=' startingAt: startIndex+attribute size.
+ stopIndex := aTag findString: '>' startingAt: startIndex+1].
- stopIndex := aTag findString: '"' startingAt: startIndex+1.
  result add: (TextURL new url: (aTag copyFrom: startIndex+1 to: stopIndex-1))].
 
  ^ result!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Collections-mt.795.mcz

marcel.taeumel
Ah, sorry. That loop thing was in the HelpBrowser only.

Best,
Marcel

Am 17.05.2018 08:09:22 schrieb [hidden email] <[hidden email]>:

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

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

Name: Collections-mt.795
Author: mt
Time: 17 May 2018, 8:08:41.389712 am
UUID: ce581475-faa1-3446-978c-84ef85a10d63
Ancestors: Collections-nice.794

Fixes an endless-loop bug as well as adds support for hrefs without quotes in the HtmlReadWriter.

=============== Diff against Collections-nice.794 ===============

Item was changed:
----- Method: HtmlReadWriter>>mapATag: (in category 'mapping') -----
mapATag: aTag

| result startIndex stopIndex attribute |
result := OrderedCollection new.

""
attribute := 'href'.
startIndex := aTag findString: attribute.
startIndex > 0 ifTrue: [
startIndex := aTag findString: '"' startingAt: startIndex+attribute size.
+ startIndex > 0
+ ifTrue: [stopIndex := aTag findString: '"' startingAt: startIndex+1]
+ ifFalse: [
+ "URLs without quotes..."
+ startIndex := aTag findString: '=' startingAt: startIndex+attribute size.
+ stopIndex := aTag findString: '>' startingAt: startIndex+1].
- stopIndex := aTag findString: '"' startingAt: startIndex+1.
result add: (TextURL new url: (aTag copyFrom: startIndex+1 to: stopIndex-1))].

^ result!