From 434dfc69901668b99e656fab83dc16dfa8cace4f Mon Sep 17 00:00:00 2001 From: Torsten Bergmann Date: Tue, 28 May 2024 14:28:58 +0200 Subject: [PATCH] Use isNotNil instead of notNil Fix #676 --- .../MicHTMLDocumentTest.class.st | 2 +- src/Microdown-HTMLExporter/MicHTMLStyler.class.st | 8 ++++---- src/Microdown-HTMLExporter/Microdown.extension.st | 6 +++--- src/Microdown-RichTextComposer/MicRichTextCanvas.class.st | 2 +- src/Microdown-Tests/MicFileResourceReferenceTest.class.st | 2 +- src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st | 2 +- src/Microdown-Tests/MicResourceSettingsTest.class.st | 2 +- src/Microdown/MicAbstractBlock.class.st | 2 +- src/Microdown/MicArgumentList.class.st | 2 +- src/Microdown/MicFigureBlock.class.st | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Microdown-HTMLExporter-Tests/MicHTMLDocumentTest.class.st b/src/Microdown-HTMLExporter-Tests/MicHTMLDocumentTest.class.st index 4629ea60..453a9031 100644 --- a/src/Microdown-HTMLExporter-Tests/MicHTMLDocumentTest.class.st +++ b/src/Microdown-HTMLExporter-Tests/MicHTMLDocumentTest.class.st @@ -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'. diff --git a/src/Microdown-HTMLExporter/MicHTMLStyler.class.st b/src/Microdown-HTMLExporter/MicHTMLStyler.class.st index 191ee3bb..81c61570 100644 --- a/src/Microdown-HTMLExporter/MicHTMLStyler.class.st +++ b/src/Microdown-HTMLExporter/MicHTMLStyler.class.st @@ -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 if the receiver has a Microdown HTML document opened" - ^ micHtmlDocument notNil + ^ micHtmlDocument isNotNil ] { #category : 'testing' } MicHTMLStyler >> hasMicDocumentFileRef [ "Answer if the receiver has a Microdown documennt supplied by the user" - ^ micDocumentFileRef notNil + ^ micDocumentFileRef isNotNil ] { #category : 'testing' } MicHTMLStyler >> hasMicDocumentString [ "Answer if the receiver has a Microdown documennt supplied by the user" - ^ micDocumentString notNil + ^ micDocumentString isNotNil ] { #category : 'testing' } diff --git a/src/Microdown-HTMLExporter/Microdown.extension.st b/src/Microdown-HTMLExporter/Microdown.extension.st index cf78d7cf..61b11af1 100644 --- a/src/Microdown-HTMLExporter/Microdown.extension.st +++ b/src/Microdown-HTMLExporter/Microdown.extension.st @@ -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. @@ -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. @@ -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 diff --git a/src/Microdown-RichTextComposer/MicRichTextCanvas.class.st b/src/Microdown-RichTextComposer/MicRichTextCanvas.class.st index 3a855b27..58633b82 100644 --- a/src/Microdown-RichTextComposer/MicRichTextCanvas.class.st +++ b/src/Microdown-RichTextComposer/MicRichTextCanvas.class.st @@ -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. diff --git a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st index 11c05d50..a58b5c41 100644 --- a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st @@ -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 ] diff --git a/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st b/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st index 9963ab06..a97911a4 100644 --- a/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st @@ -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 ] diff --git a/src/Microdown-Tests/MicResourceSettingsTest.class.st b/src/Microdown-Tests/MicResourceSettingsTest.class.st index e976b97d..dc81b863 100644 --- a/src/Microdown-Tests/MicResourceSettingsTest.class.st +++ b/src/Microdown-Tests/MicResourceSettingsTest.class.st @@ -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. ] diff --git a/src/Microdown/MicAbstractBlock.class.st b/src/Microdown/MicAbstractBlock.class.st index 51dcc051..a3f5f3f3 100644 --- a/src/Microdown/MicAbstractBlock.class.st +++ b/src/Microdown/MicAbstractBlock.class.st @@ -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' } diff --git a/src/Microdown/MicArgumentList.class.st b/src/Microdown/MicArgumentList.class.st index e996e96d..e62fe019 100644 --- a/src/Microdown/MicArgumentList.class.st +++ b/src/Microdown/MicArgumentList.class.st @@ -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' } diff --git a/src/Microdown/MicFigureBlock.class.st b/src/Microdown/MicFigureBlock.class.st index c6e499b4..0f9313ce 100644 --- a/src/Microdown/MicFigureBlock.class.st +++ b/src/Microdown/MicFigureBlock.class.st @@ -82,7 +82,7 @@ MicFigureBlock >> hasAnchor [ { #category : 'testing' } MicFigureBlock >> hasCaption [ - ^ captionElements notNil + ^ captionElements isNotNil ] { #category : 'testing' }