diff --git a/src/Microdown/MicAbstractCodeBlock.class.st b/src/Microdown/MicAbstractCodeBlock.class.st index 1c08b322..8e833478 100644 --- a/src/Microdown/MicAbstractCodeBlock.class.st +++ b/src/Microdown/MicAbstractCodeBlock.class.st @@ -15,7 +15,7 @@ MicAbstractCodeBlock class >> alternateBlockClassFor: line [ | tag | tag := ((line allButFirst: CodeblockMarkup size) - copyUpTo: $|) trimBoth. + copyUpTo: $|) trimBoth asSymbol. tag = #script ifTrue: [ ^ MicScriptBlock ]. ^ MicScriptBlock allSubclasses detect: [ :each | each tag = tag ] ifNone: [ MicCodeBlock ] ] diff --git a/src/Microdown/MicArgumentList.class.st b/src/Microdown/MicArgumentList.class.st index 7f94a8f8..c44d394c 100644 --- a/src/Microdown/MicArgumentList.class.st +++ b/src/Microdown/MicArgumentList.class.st @@ -116,7 +116,7 @@ MicArgumentList >> printOn: aStream [ self hasNonDefaultValue ifTrue:[ aStream nextPutAll: self defaultValue. - argKeys := self keys copyWithout: self defaultArg. + argKeys := self keys copyWithout: self defaultArg asSymbol. argKeys ifNotEmpty: [aStream nextPut: $|]] ifFalse: [argKeys := self keys]. aStream nextPutAll: ((argKeys collect: [:k| k,'=',(self at:k)]) joinUsing: '&') diff --git a/src/Microdown/MicElement.class.st b/src/Microdown/MicElement.class.st index 0c2c2440..69474268 100644 --- a/src/Microdown/MicElement.class.st +++ b/src/Microdown/MicElement.class.st @@ -36,7 +36,11 @@ MicElement class >> buildMicroDownUsing: aBuilder withComment: aComment [ { #category : #utilities } MicElement class >> extensionClassFor: tag [ "I am a utility method used in extension blocks to find the right subclass to instantiate" - ^ self allSubclasses detect: [ :each | each tag = tag ] ifNone: [ self ] + + | tagSymbol | + + tagSymbol := tag asSymbol. + ^ self allSubclasses detect: [ :each | each tag = tagSymbol ] ifNone: [ self ] ] { #category : #visiting } diff --git a/src/Microdown/MicResourceReference.class.st b/src/Microdown/MicResourceReference.class.st index 0b7f5c4f..f53b2c9d 100644 --- a/src/Microdown/MicResourceReference.class.st +++ b/src/Microdown/MicResourceReference.class.st @@ -40,7 +40,7 @@ MicResourceReference class >> fromUri: aString [ uri scheme ifNil: [ ^ MicRelativeResourceReference new relativePath: aString ]. refClass := self allSubclasses - detect: [ :rc | rc handlesUriScheme: uri scheme ] + detect: [ :rc | rc handlesUriScheme: uri scheme asString ] ifNone: [ MicUnknownResourceUri ]. ^ refClass newFromUri: uri