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

Use isNotNil instead of notNil #753

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ MicHTMLDocumentTest >> testCharSet [
description: 'It tests that the charSet identifier is a String'.

self
assert: doc charSet notNil
assert: doc charSet isNotNil
description: 'It test that the document charset has beed initialized'.


Expand Down
8 changes: 4 additions & 4 deletions src/Microdown-HTMLExporter/MicHTMLStyler.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -129,28 +129,28 @@ MicHTMLStyler >> frameworks [
{ #category : 'testing' }
MicHTMLStyler >> hasCssSelection [

^ self cssListPresenter notNil and: [ self cssListPresenter selection isEmpty not ]
^ self cssListPresenter isNotNil and: [ self cssListPresenter selection isNotEmpty ]
]

{ #category : 'testing' }
MicHTMLStyler >> hasMicDocument [
"Answer <true> if the receiver has a Microdown HTML document opened"

^ micHtmlDocument notNil
^ micHtmlDocument isNotNil
]

{ #category : 'testing' }
MicHTMLStyler >> hasMicDocumentFileRef [
"Answer <true> if the receiver has a Microdown documennt supplied by the user"

^ micDocumentFileRef notNil
^ micDocumentFileRef isNotNil
]

{ #category : 'testing' }
MicHTMLStyler >> hasMicDocumentString [
"Answer <true> if the receiver has a Microdown documennt supplied by the user"

^ micDocumentString notNil
^ micDocumentString isNotNil
]

{ #category : 'testing' }
Expand Down
6 changes: 3 additions & 3 deletions src/Microdown-HTMLExporter/Microdown.extension.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Extension { #name : 'Microdown' }

{ #category : '*Microdown-HTMLExporter' }
Microdown classSide >> asHTMLDocument: aStringOrDoc [
Microdown class >> asHTMLDocument: aStringOrDoc [
"Facade method to serialize a Microdown document or string to HTML"

^ MicHTMLVisitor serializeToHTMLDoc: aStringOrDoc.
Expand All @@ -10,7 +10,7 @@ Microdown classSide >> asHTMLDocument: aStringOrDoc [
]

{ #category : '*Microdown-HTMLExporter' }
Microdown classSide >> asHTMLString: aStringOrDoc [
Microdown class >> asHTMLString: aStringOrDoc [
"Facade method to render a microdown document or string to HTML"

^ MicHTMLVisitor asHTMLString: aStringOrDoc.
Expand All @@ -19,7 +19,7 @@ Microdown classSide >> asHTMLString: aStringOrDoc [
]

{ #category : '*Microdown-HTMLExporter' }
Microdown classSide >> asHTMLString: aStringOrDoc configuration: aMicHTMLConfiguration [
Microdown class >> asHTMLString: aStringOrDoc configuration: aMicHTMLConfiguration [
"Facade method to render a microdown document or string to HTML"

^ MicHTMLVisitor asHTMLString: aStringOrDoc configuration: aMicHTMLConfiguration
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown-RichTextComposer/MicRichTextCanvas.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ MicRichTextCanvas >> << aText [
text := aText asText.
brushes do: [ :brush | brush paint: text ].
"If no font is already put, and a body font is defined, apply it"
((self hasFontDefinitions: text) not and: [ self textStyler bodyFont notNil])
((self hasFontDefinitions: text) not and: [ self textStyler bodyFont isNotNil])
ifTrue: [
text addAttribute: (TextFontReference toFont: self textStyler bodyFont)].
out << text.
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown-Tests/MicFileResourceReferenceTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ MicFileResourceReferenceTest >> testLoadImage [
ref := (MicResourceReference fromUri: 'file:/toplevel.png')
filesystem: filesystem.
image := ref loadImage.
self assert: image notNil.
self assert: image isNotNil.
self assert: image height equals: 90.
self assert: image width equals: 200
]
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ MicHTTPResourceReferenceTest >> testLoadImage [
| ref image |
ref := MicResourceReference fromUri: baseUrl , 'toplevel.png'.
image := ref loadImage.
self assert: image notNil.
self assert: image isNotNil.
self assert: image height equals: 90.
self assert: image width equals: 200
]
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown-Tests/MicResourceSettingsTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ MicResourceSettingsTest >> testIsCashingResourcesTrue [
subject isCachingResources: true.
self assert: (self cacheAt: self imageUrl) equals: nil.
sample := Microdown asRichText: ('![](', self imageUrl,')' ).
self assert: (self cacheAt: self imageUrl asZnUrl ) notNil.
self assert: (self cacheAt: self imageUrl asZnUrl ) isNotNil.

]

Expand Down
2 changes: 1 addition & 1 deletion src/Microdown/MicAbstractBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ MicAbstractBlock >> computeNestedLevel [
MicAbstractBlock >> hasProperty: aKey [
"Test if the property aKey is present."

^ self properties notNil and: [ self properties includesKey: aKey ]
^ self properties isNotNil and: [ self properties includesKey: aKey ]
]

{ #category : 'accessing' }
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 @@ -96,7 +96,7 @@ MicArgumentList >> hasNonDefaultArguments [
{ #category : 'testing' }
MicArgumentList >> hasNonDefaultValue [
"return true if the default arg was given a value"
^ self defaultValue notNil and: [ self defaultValue ~= initialValue ]
^ self defaultValue isNotNil and: [ self defaultValue ~= initialValue ]
]

{ #category : 'accessing' }
Expand Down
2 changes: 1 addition & 1 deletion src/Microdown/MicFigureBlock.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ MicFigureBlock >> hasAnchor [
{ #category : 'testing' }
MicFigureBlock >> hasCaption [

^ captionElements notNil
^ captionElements isNotNil
]

{ #category : 'testing' }
Expand Down
Loading