From 9adb0c602bab77ee5d1f4e8c06c4ed3df4a75d3c Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Mon, 4 Nov 2024 15:37:18 +0100 Subject: [PATCH] Some cleanups - Put methods in the right protocols - Remove methods with equivalents in the superclass - Remove method with undeclared var - Move Error class from test to model package --- .../MicMicrodownSnippetFactory.class.st | 7 ------- src/Microdown/MicAnnotatedParagraphBlock.class.st | 2 +- src/Microdown/MicEnvironmentBlock.class.st | 2 +- src/Microdown/MicFigureBlock.class.st | 12 ------------ src/Microdown/MicInlineDelimiter.class.st | 6 +++--- src/Microdown/MicInlineElement.class.st | 6 ------ .../MicPropertyError.class.st | 4 ++-- src/Microdown/MicTextBlock.class.st | 14 -------------- 8 files changed, 7 insertions(+), 46 deletions(-) rename src/{Microdown-Tests => Microdown}/MicPropertyError.class.st (53%) diff --git a/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st b/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st index eee75c7c..17898013 100644 --- a/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st +++ b/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st @@ -51,13 +51,6 @@ MicMicrodownSnippetFactory class >> buildDocument [ << (factory perform: elementTypeSelector) ] ] ] ] -{ #category : 'utilities' } -MicMicrodownSnippetFactory class >> protocolNames [ - "Return the list of all the protocol names included in this class." - - ^ self protocols collect: [ :protocol | protocol name ] -] - { #category : 'anchor' } MicMicrodownSnippetFactory >> anchorAreTrimedSample [ ^ AnchorMarkup, ' test ' diff --git a/src/Microdown/MicAnnotatedParagraphBlock.class.st b/src/Microdown/MicAnnotatedParagraphBlock.class.st index aa0f27a6..49f4522d 100644 --- a/src/Microdown/MicAnnotatedParagraphBlock.class.st +++ b/src/Microdown/MicAnnotatedParagraphBlock.class.st @@ -48,7 +48,7 @@ MicAnnotatedParagraphBlock >> defaultLabel [ ^ #note ] -{ #category : 'testing' } +{ #category : 'initialization' } MicAnnotatedParagraphBlock >> initialize [ super initialize. diff --git a/src/Microdown/MicEnvironmentBlock.class.st b/src/Microdown/MicEnvironmentBlock.class.st index 933db360..e30cf696 100644 --- a/src/Microdown/MicEnvironmentBlock.class.st +++ b/src/Microdown/MicEnvironmentBlock.class.st @@ -176,7 +176,7 @@ MicEnvironmentBlock >> extractFirstLineFrom: aLine [ ifFalse: [ firstLine ] ] -{ #category : 'parse support' } +{ #category : 'initialization' } MicEnvironmentBlock >> initialize [ super initialize. diff --git a/src/Microdown/MicFigureBlock.class.st b/src/Microdown/MicFigureBlock.class.st index 62205251..92b7ea4b 100644 --- a/src/Microdown/MicFigureBlock.class.st +++ b/src/Microdown/MicFigureBlock.class.st @@ -30,18 +30,6 @@ MicFigureBlock class >> openingDelimiter [ ^ FigureNameOpenerMarkup ] -{ #category : 'testing' } -MicFigureBlock >> hasAnchor [ - - ^ self anchor isNotNil -] - -{ #category : 'testing' } -MicFigureBlock >> hasCaption [ - - ^ captionElements isNotNil -] - { #category : 'visiting' } MicFigureBlock >> accept: aVisitor [ ^ aVisitor visitFigure: self diff --git a/src/Microdown/MicInlineDelimiter.class.st b/src/Microdown/MicInlineDelimiter.class.st index db4103ad..ed09d894 100644 --- a/src/Microdown/MicInlineDelimiter.class.st +++ b/src/Microdown/MicInlineDelimiter.class.st @@ -43,7 +43,7 @@ MicInlineDelimiter class >> at: markup [ ^ DelimiterDictionary at: markup ifAbsent: [ nil ] ] -{ #category : 'initialization' } +{ #category : 'class initialization' } MicInlineDelimiter class >> initialize [