The Trunk: HelpSystem-Core-mt.103.mcz

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

The Trunk: HelpSystem-Core-mt.103.mcz

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

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

Name: HelpSystem-Core-mt.103
Author: mt
Time: 17 May 2018, 8:11:07.304712 am
UUID: 877ee1d0-e54d-994b-87bc-fa75edb201e1
Ancestors: HelpSystem-Core-mt.102

Fixes an endless-loop bug to could occur when fetching swiki subtopics.

=============== Diff against HelpSystem-Core-mt.102 ===============

Item was changed:
  ----- Method: HtmlHelpTopic>>subtopicUrls (in category 'accessing') -----
  subtopicUrls
 
  ^ subtopicUrls ifNil: [
  | start end endGuard |
  subtopicUrls := OrderedCollection new.
 
  start := self document findString: '<a '.
  start := self document findString: 'href' startingAt: start.
  [start > 0] whileTrue: [
  start := self document findString: '"' startingAt: start.
  end := self document findString: '"' startingAt: start+1.
  endGuard := self document findString: '>' startingAt: start+1.
+ end > 0 ifTrue: [
+ end < endGuard
+ ifTrue: [subtopicUrls addIfNotPresent: (self document copyFrom: start+1 to: end-1)].
+ start := self document findString: '<a ' startingAt: end+1].
- (end > 0 and: [end < endGuard])
- ifTrue: [subtopicUrls addIfNotPresent: (self document copyFrom: start+1 to: end-1)].
- start := self document findString: '<a ' startingAt: end+1.
  start > 0 ifTrue: [start := self document findString: 'href' startingAt: start]].
 
  subtopicUrls := subtopicUrls
  select: self selectBlock
  thenCollect: self convertBlock.
  subtopicUrls]!