Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements compatibility with Strict Symbol Comparison feature in Pharo #923

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microdown/MicAbstractCodeBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
]
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown/MicArgumentList.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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: '&')
Expand Down
6 changes: 5 additions & 1 deletion src/Microdown/MicElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown/MicResourceReference.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down