Skip to content

Commit

Permalink
Merge pull request #917 from jecisc/cleanups
Browse files Browse the repository at this point in the history
Some cleanups
  • Loading branch information
jecisc authored Nov 4, 2024
2 parents b11a6a4 + 9adb0c6 commit 23dbd81
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 46 deletions.
7 changes: 0 additions & 7 deletions src/Microdown-Tests/MicMicrodownSnippetFactory.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown/MicAnnotatedParagraphBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ MicAnnotatedParagraphBlock >> defaultLabel [
^ #note
]

{ #category : 'testing' }
{ #category : 'initialization' }
MicAnnotatedParagraphBlock >> initialize [

super initialize.
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown/MicEnvironmentBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ MicEnvironmentBlock >> extractFirstLineFrom: aLine [
ifFalse: [ firstLine ]
]

{ #category : 'parse support' }
{ #category : 'initialization' }
MicEnvironmentBlock >> initialize [

super initialize.
Expand Down
12 changes: 0 additions & 12 deletions src/Microdown/MicFigureBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Microdown/MicInlineDelimiter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ MicInlineDelimiter class >> at: markup [
^ DelimiterDictionary at: markup ifAbsent: [ nil ]
]

{ #category : 'initialization' }
{ #category : 'class initialization' }
MicInlineDelimiter class >> initialize [

<script>
DelimiterDictionary := nil.
Regex := nil
]

{ #category : 'initialization' }
{ #category : 'class initialization' }
MicInlineDelimiter class >> initializeDelimiters [

self = MicInlineDelimiter ifFalse: [ ^ self ].
DelimiterDictionary := Dictionary new.
self allSubclasses do: [ :class | class initializeDelimiters ]
]

{ #category : 'initialization' }
{ #category : 'class initialization' }
MicInlineDelimiter class >> initializeRegex [

Regex := ((self all collect: [ :each | each markupAsRegex]) joinUsing: '|') asRegex
Expand Down
6 changes: 0 additions & 6 deletions src/Microdown/MicInlineElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ MicInlineElement >> closingDelimiter [
^ self class closingDelimiter
]

{ #category : 'private' }
MicInlineElement >> inlineParserClass [

^ MicInlineParser
]

{ #category : 'accessing' }
MicInlineElement >> kind [
"Should only be used for tests"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : 'MicPropertyError',
#superclass : 'Error',
#category : 'Microdown-Tests-Parser',
#package : 'Microdown-Tests',
#category : 'Microdown-Parser',
#package : 'Microdown',
#tag : 'Parser'
}
14 changes: 0 additions & 14 deletions src/Microdown/MicTextBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@ MicTextBlock >> accept: aVisitor [
^ aVisitor visitText: self
]

{ #category : 'obsolete' }
MicTextBlock >> bodystring [
"Should only be used for tests"
self deprecated: 'Just use bodyString' transformWith: '`@rec bodystring' -> '`@rec bodyString'.
^ bodyString
]

{ #category : 'obsolete' }
MicTextBlock >> substring [
"Should only be used for tests"
self deprecated: 'Just use bodystring' transformWith: '`@rec substring' -> '`@rec bodystring'.
^ bodyString
]

{ #category : 'obsolete' }
MicTextBlock >> substring: aBody [
"Should only be used for tests"
Expand Down

0 comments on commit 23dbd81

Please sign in to comment.