From c4534dc70c86538e95896b5bb38b8bd684c57f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phaneDucasse?= Date: Mon, 23 Sep 2024 11:30:10 +0200 Subject: [PATCH] Just some formatting while scanning code. --- .../MicReferenceChecker.class.st | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/Microdown-BookTester/MicReferenceChecker.class.st b/src/Microdown-BookTester/MicReferenceChecker.class.st index ceaffb06..50e79193 100644 --- a/src/Microdown-BookTester/MicReferenceChecker.class.st +++ b/src/Microdown-BookTester/MicReferenceChecker.class.st @@ -99,8 +99,7 @@ MicReferenceChecker >> collectBadReferences [ | badReference existingAnchorNames | existingAnchorNames := (anchors collect: [ :each | each anchorLabel ]). badReference := references reject: [ :anchorReference | - existingAnchorNames includes: - anchorReference anchorLabel ]. + existingAnchorNames includes: anchorReference anchorLabel ]. badReference do: [ :each | self addBadReferenceAnchor: each ] ] @@ -122,9 +121,8 @@ MicReferenceChecker >> handleAnchorOf: anElement [ anElement hasAnchor ifFalse: [ ^ self ]. (self hasAlreadyDefinedAs: anElement) ifTrue: [ - duplicatedAnchors add: anElement . - self addDuplicatedAnchor: anElement . - ]. + duplicatedAnchors add: anElement. + self addDuplicatedAnchor: anElement ]. anchors add: anElement ] @@ -229,10 +227,10 @@ MicReferenceChecker >> unknownAnchors [ | unknown ref | unknown := OrderedCollection new. ref := references copy. - ref do: [ :ref | + ref do: [ :reference | (anchors noneSatisfy: [ :each | ref anchorLabel = each anchorLabel ]) - ifTrue: [ unknown add: ref ] ]. + ifTrue: [ unknown add: reference ] ]. ^ unknown ] @@ -243,8 +241,7 @@ MicReferenceChecker >> visitAnchor: anAnchor [ isAlready := self hasAlreadyDefinedAs: anAnchor. isAlready ifTrue: [ duplicatedAnchors add: anAnchor. - self addDuplicatedAnchor: anAnchor - ]. + self addDuplicatedAnchor: anAnchor ]. anchors add: anAnchor ]