Skip to content

Commit

Permalink
removgint the reference to reference checker
Browse files Browse the repository at this point in the history
  • Loading branch information
Ducasse committed Jun 27, 2024
1 parent c0c3cb0 commit 2356976
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/BaselineOfMicrodown/BaselineOfMicrodown.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ BaselineOfMicrodown >> baseline: spec [
group: 'RichText' with: #( 'Core' 'Microdown-RichTextComposer' );
group: 'Extensions'
with: #( #'Microdown-Evaluator' #'Microdown-Evaluator-Tests'
#'Microdown-ReferenceChecker'
#'Microdown-PrettyPrinter' #'Microdown-PrettyPrinter-Tests'
#'Microdown-HTMLExporter' #'Microdown-HTMLExporter-Tests'
#'Microdown-LaTeXExporter' #'Microdown-LaTeXExporter-Tests'
Expand Down
20 changes: 20 additions & 0 deletions src/Microdown-BookTester/MicReferenceChecker.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ MicReferenceChecker >> initialize [
duplicatedAnchors := OrderedCollection new
]

{ #category : 'testing' }
MicReferenceChecker >> isOk [

^ duplicatedAnchors isEmpty and: [
references allSatisfy: [ :each | self hasAlreadyDefinedAs: each ] ]
]

{ #category : 'testing' }
MicReferenceChecker >> isOkay [

Expand All @@ -163,6 +170,19 @@ MicReferenceChecker >> isOkay [

]

{ #category : 'reporting' }
MicReferenceChecker >> unknownAnchors [

| unknown ref |
unknown := OrderedCollection new.
ref := references copy.
ref do: [ :ref |
(anchors noneSatisfy: [ :each |
ref anchorLabel = each anchorLabel ])
ifTrue: [ unknown add: ref ] ].
^ unknown
]

{ #category : 'visiting' }
MicReferenceChecker >> visitAnchor: anAnchor [

Expand Down

0 comments on commit 2356976

Please sign in to comment.