Skip to content

Strange Code #1082

@Ducasse

Description

@Ducasse
processTextBlock: aTextBlock atIndex: index withChildren: children inParagraph: aParagraph
	| words anchorBlock |
	words := aTextBlock bodyString substrings.
	words isEmpty ifTrue: [ ^ self ].
	anchorBlock := (index < children size and: [ (children at: index + 1) isKindOf: MicAnchorReferenceBlock ])
		ifTrue: [ children at: index + 1 ]
		ifFalse: [ nil ].
	
	self analyzeWords: words inTextBlock: aTextBlock inParagraph: aParagraph anchorBlock: anchorBlock

I do not get definition and use of anchorBlock.
In particular it looks like it could be nil when the condition is false. and we are passing it around.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions