diff --git a/src/BaselineOfMicrodown/BaselineOfMicrodown.class.st b/src/BaselineOfMicrodown/BaselineOfMicrodown.class.st index cfeafffa..973adc5a 100644 --- a/src/BaselineOfMicrodown/BaselineOfMicrodown.class.st +++ b/src/BaselineOfMicrodown/BaselineOfMicrodown.class.st @@ -3,12 +3,13 @@ Microdown is a minimal but extensible markup language. It is kind of compatible Read comment of MicroDownParser. " Class { - #name : #BaselineOfMicrodown, - #superclass : #BaselineOf, - #category : #BaselineOfMicrodown + #name : 'BaselineOfMicrodown', + #superclass : 'BaselineOf', + #category : 'BaselineOfMicrodown', + #package : 'BaselineOfMicrodown' } -{ #category : #baselines } +{ #category : 'baselines' } BaselineOfMicrodown >> baseline: spec [ @@ -99,7 +100,7 @@ BaselineOfMicrodown >> baseline: spec [ group: 'All' with: #('Core' 'Tests' 'Extensions' 'Microdown-Pharo-Tools' 'RichText') ] ] -{ #category : #'external projects' } +{ #category : 'external projects' } BaselineOfMicrodown >> pillar: spec [ spec @@ -110,7 +111,7 @@ BaselineOfMicrodown >> pillar: spec [ repository: 'github://pillar-markup/pillar:dev-8' ] ] -{ #category : #'external projects' } +{ #category : 'external projects' } BaselineOfMicrodown >> xmlParserHtml: spec [ spec diff --git a/src/BaselineOfMicrodown/ManifestBaselineOfMicrodown.class.st b/src/BaselineOfMicrodown/ManifestBaselineOfMicrodown.class.st index 89c91364..7483f0f3 100644 --- a/src/BaselineOfMicrodown/ManifestBaselineOfMicrodown.class.st +++ b/src/BaselineOfMicrodown/ManifestBaselineOfMicrodown.class.st @@ -3,7 +3,9 @@ The Microdown project is a parser and document model for Microdown a clean and l See `#'Microdown'` " Class { - #name : #ManifestBaselineOfMicrodown, - #superclass : #PackageManifest, - #category : #'BaselineOfMicrodown-Manifest' + #name : 'ManifestBaselineOfMicrodown', + #superclass : 'PackageManifest', + #category : 'BaselineOfMicrodown-Manifest', + #package : 'BaselineOfMicrodown', + #tag : 'Manifest' } diff --git a/src/BaselineOfMicrodown/package.st b/src/BaselineOfMicrodown/package.st index b8214190..a9299ce8 100644 --- a/src/BaselineOfMicrodown/package.st +++ b/src/BaselineOfMicrodown/package.st @@ -1 +1 @@ -Package { #name : #BaselineOfMicrodown } +Package { #name : 'BaselineOfMicrodown' } diff --git a/src/BaselineOfMicrodownDev/BaselineOfMicrodownDev.class.st b/src/BaselineOfMicrodownDev/BaselineOfMicrodownDev.class.st index be34f997..09670081 100644 --- a/src/BaselineOfMicrodownDev/BaselineOfMicrodownDev.class.st +++ b/src/BaselineOfMicrodownDev/BaselineOfMicrodownDev.class.st @@ -1,10 +1,11 @@ Class { - #name : #BaselineOfMicrodownDev, - #superclass : #BaselineOf, - #category : #BaselineOfMicrodownDev + #name : 'BaselineOfMicrodownDev', + #superclass : 'BaselineOf', + #category : 'BaselineOfMicrodownDev', + #package : 'BaselineOfMicrodownDev' } -{ #category : #baselines } +{ #category : 'baselines' } BaselineOfMicrodownDev >> baseline: spec [ diff --git a/src/BaselineOfMicrodownDev/package.st b/src/BaselineOfMicrodownDev/package.st index 9ecd413f..eee237a3 100644 --- a/src/BaselineOfMicrodownDev/package.st +++ b/src/BaselineOfMicrodownDev/package.st @@ -1 +1 @@ -Package { #name : #BaselineOfMicrodownDev } +Package { #name : 'BaselineOfMicrodownDev' } diff --git a/src/BaselineOfMicrodownH5P/BaselineOfMicrodownH5P.class.st b/src/BaselineOfMicrodownH5P/BaselineOfMicrodownH5P.class.st index ddf83912..cfe82c52 100644 --- a/src/BaselineOfMicrodownH5P/BaselineOfMicrodownH5P.class.st +++ b/src/BaselineOfMicrodownH5P/BaselineOfMicrodownH5P.class.st @@ -14,12 +14,13 @@ baseline: spec ] " Class { - #name : #BaselineOfMicrodownH5P, - #superclass : #BaselineOf, - #category : #BaselineOfMicrodownH5P + #name : 'BaselineOfMicrodownH5P', + #superclass : 'BaselineOf', + #category : 'BaselineOfMicrodownH5P', + #package : 'BaselineOfMicrodownH5P' } -{ #category : #baselines } +{ #category : 'baselines' } BaselineOfMicrodownH5P >> baseline: spec [ diff --git a/src/BaselineOfMicrodownH5P/package.st b/src/BaselineOfMicrodownH5P/package.st index 7ae39f32..de65c60b 100644 --- a/src/BaselineOfMicrodownH5P/package.st +++ b/src/BaselineOfMicrodownH5P/package.st @@ -1 +1 @@ -Package { #name : #BaselineOfMicrodownH5P } +Package { #name : 'BaselineOfMicrodownH5P' } diff --git a/src/BaselineOfPillarSlideConverter/BaselineOfPillarSlideConverter.class.st b/src/BaselineOfPillarSlideConverter/BaselineOfPillarSlideConverter.class.st index 74011d18..7c624e79 100644 --- a/src/BaselineOfPillarSlideConverter/BaselineOfPillarSlideConverter.class.st +++ b/src/BaselineOfPillarSlideConverter/BaselineOfPillarSlideConverter.class.st @@ -1,10 +1,11 @@ Class { - #name : #BaselineOfPillarSlideConverter, - #superclass : #BaselineOf, - #category : #BaselineOfPillarSlideConverter + #name : 'BaselineOfPillarSlideConverter', + #superclass : 'BaselineOf', + #category : 'BaselineOfPillarSlideConverter', + #package : 'BaselineOfPillarSlideConverter' } -{ #category : #baselines } +{ #category : 'baselines' } BaselineOfPillarSlideConverter >> baseline: spec [ diff --git a/src/BaselineOfPillarSlideConverter/package.st b/src/BaselineOfPillarSlideConverter/package.st index 3d821954..b6e5ede3 100644 --- a/src/BaselineOfPillarSlideConverter/package.st +++ b/src/BaselineOfPillarSlideConverter/package.st @@ -1 +1 @@ -Package { #name : #BaselineOfPillarSlideConverter } +Package { #name : 'BaselineOfPillarSlideConverter' } diff --git a/src/Microdown - HTML/MicHTMLBrush.class.st b/src/Microdown - HTML/MicHTMLBrush.class.st index 94eafda6..3d42b524 100644 --- a/src/Microdown - HTML/MicHTMLBrush.class.st +++ b/src/Microdown - HTML/MicHTMLBrush.class.st @@ -2,10 +2,11 @@ I'm an abstract brush dedicated to HTML documents. As of today, the only subclass is the tag brush but we can imagine others (e.g., to write HTML comments). " Class { - #name : #MicHTMLBrush, - #superclass : #MicExportBrush, + #name : 'MicHTMLBrush', + #superclass : 'MicExportBrush', #instVars : [ 'name' ], - #category : #'Microdown - HTML' + #category : 'Microdown - HTML', + #package : 'Microdown - HTML' } diff --git a/src/Microdown - HTML/MicHTMLCanvas.class.st b/src/Microdown - HTML/MicHTMLCanvas.class.st index 1b866c6d..e3ec237d 100644 --- a/src/Microdown - HTML/MicHTMLCanvas.class.st +++ b/src/Microdown - HTML/MicHTMLCanvas.class.st @@ -1,16 +1,17 @@ Class { - #name : #MicHTMLCanvas, - #superclass : #MicExportCanvas, + #name : 'MicHTMLCanvas', + #superclass : 'MicExportCanvas', #instVars : [ 'name' ], #classVars : [ 'HTMLCharacters' ], - #category : #'Microdown - HTML' + #category : 'Microdown - HTML', + #package : 'Microdown - HTML' } -{ #category : #initialization } +{ #category : 'initialization' } MicHTMLCanvas class >> initialize [ HTMLCharacters := Dictionary new. HTMLCharacters @@ -20,14 +21,14 @@ MicHTMLCanvas class >> initialize [ at: $> put: '>' ] -{ #category : #accessing } +{ #category : 'accessing' } MicHTMLCanvas >> nextPut: aCharacter [ (HTMLCharacters at: aCharacter ifAbsent: nil) ifNil: [ super nextPut: aCharacter ] ifNotNil: [ :string | self raw: string ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicHTMLCanvas >> tag [ ^ self brush: MicHTMLTag new ] diff --git a/src/Microdown - HTML/MicHTMLExporterTest.class.st b/src/Microdown - HTML/MicHTMLExporterTest.class.st index 276456f2..9002c508 100644 --- a/src/Microdown - HTML/MicHTMLExporterTest.class.st +++ b/src/Microdown - HTML/MicHTMLExporterTest.class.st @@ -1,15 +1,16 @@ Class { - #name : #MicHTMLExporterTest, - #superclass : #TestCase, + #name : 'MicHTMLExporterTest', + #superclass : 'TestCase', #instVars : [ 'parser', 'writer', 'factory' ], - #category : #'Microdown - HTML' + #category : 'Microdown - HTML', + #package : 'Microdown - HTML' } -{ #category : #utils } +{ #category : 'utils' } MicHTMLExporterTest >> parse: aString andCheckWeGet: aResultingString [ | mic | @@ -17,7 +18,7 @@ MicHTMLExporterTest >> parse: aString andCheckWeGet: aResultingString [ self assert: (writer visit: mic) contents equals: aResultingString ] -{ #category : #running } +{ #category : 'running' } MicHTMLExporterTest >> setUp [ super setUp. parser := MicroDownParser new. @@ -25,14 +26,14 @@ MicHTMLExporterTest >> setUp [ factory := MicMicrodownSnippetFactory new ] -{ #category : #tests } +{ #category : 'tests' } MicHTMLExporterTest >> testHeaderLevel1 [ self parse: factory headerLevel1Sample andCheckWeGet: writer usedNewLine , '

Foo

' ] -{ #category : #tests } +{ #category : 'tests' } MicHTMLExporterTest >> testUnorderedList [ | mic | mic := parser parse: factory unorderedListWithTwoItemsSample. diff --git a/src/Microdown - HTML/MicHTMLTag.class.st b/src/Microdown - HTML/MicHTMLTag.class.st index 40fef53a..093fa2db 100644 --- a/src/Microdown - HTML/MicHTMLTag.class.st +++ b/src/Microdown - HTML/MicHTMLTag.class.st @@ -1,21 +1,22 @@ Class { - #name : #MicHTMLTag, - #superclass : #MicHTMLBrush, - #category : #'Microdown - HTML' + #name : 'MicHTMLTag', + #superclass : 'MicHTMLBrush', + #category : 'Microdown - HTML', + #package : 'Microdown - HTML' } -{ #category : #accessing } +{ #category : 'accessing' } MicHTMLTag >> name: aString [ name := aString. stream nextPut: $<; << aString ] -{ #category : #accessing } +{ #category : 'accessing' } MicHTMLTag >> parameterAt: aString put: anotherString [ stream space. stream << aString << '="' << anotherString << '"' ] -{ #category : #accessing } +{ #category : 'accessing' } MicHTMLTag >> with: aString [ stream nextPut: $>; diff --git a/src/Microdown - HTML/MicHTMLWriter.class.st b/src/Microdown - HTML/MicHTMLWriter.class.st index bff99516..21ef8e69 100644 --- a/src/Microdown - HTML/MicHTMLWriter.class.st +++ b/src/Microdown - HTML/MicHTMLWriter.class.st @@ -1,25 +1,26 @@ Class { - #name : #MicHTMLWriter, - #superclass : #MicrodownVisitor, + #name : 'MicHTMLWriter', + #superclass : 'MicrodownVisitor', #instVars : [ 'stream', 'canvas' ], - #category : #'Microdown - HTML' + #category : 'Microdown - HTML', + #package : 'Microdown - HTML' } -{ #category : #initialization } +{ #category : 'initialization' } MicHTMLWriter >> canvasClass [ ^ MicHTMLCanvas ] -{ #category : #accessing } +{ #category : 'accessing' } MicHTMLWriter >> contents [ ^ stream contents ] -{ #category : #initialization } +{ #category : 'initialization' } MicHTMLWriter >> initialize [ super initialize. stream := MicOutputStream new setStream: (WriteStream on: (String new: 1000)). @@ -27,14 +28,14 @@ MicHTMLWriter >> initialize [ ] -{ #category : #initialization } +{ #category : 'initialization' } MicHTMLWriter >> usedNewLine [ "Return the encoded new line. Useful for tests." ^ stream usedNewLine ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLWriter >> visitHeader: aHeader [ canvas newLine. @@ -44,7 +45,7 @@ MicHTMLWriter >> visitHeader: aHeader [ ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLWriter >> visitUnorderedList: anUnorderedList [ canvas newLine. @@ -53,7 +54,7 @@ MicHTMLWriter >> visitUnorderedList: anUnorderedList [ with: [ canvas newLine. super visitUnorderedList: anUnorderedList ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLWriter >> visitUnorderedListItem: anUnorderedListItem [ "will not work with we have text decorators such as bold, italic, monospace" diff --git a/src/Microdown - HTML/package.st b/src/Microdown - HTML/package.st index d4ad9d91..3ba85e08 100644 --- a/src/Microdown - HTML/package.st +++ b/src/Microdown - HTML/package.st @@ -1 +1 @@ -Package { #name : #'Microdown - HTML' } +Package { #name : 'Microdown - HTML' } diff --git a/src/Microdown-Agenda-Tests/MicAgendaBlockTest.class.st b/src/Microdown-Agenda-Tests/MicAgendaBlockTest.class.st index c6014073..e1ce3153 100644 --- a/src/Microdown-Agenda-Tests/MicAgendaBlockTest.class.st +++ b/src/Microdown-Agenda-Tests/MicAgendaBlockTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #MicAgendaBlockTest, - #superclass : #TestCase, + #name : 'MicAgendaBlockTest', + #superclass : 'TestCase', #instVars : [ 'builder', 'parser' @@ -8,10 +8,11 @@ Class { #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Agenda-Tests' + #category : 'Microdown-Agenda-Tests', + #package : 'Microdown-Agenda-Tests' } -{ #category : #running } +{ #category : 'running' } MicAgendaBlockTest >> setUp [ super setUp. @@ -19,7 +20,7 @@ MicAgendaBlockTest >> setUp [ parser := Microdown new. ] -{ #category : #tests } +{ #category : 'tests' } MicAgendaBlockTest >> testAgenda [ "' @@ -33,7 +34,7 @@ MicAgendaBlockTest >> testAgenda [ self assert: env environmentName equals: 'agenda' ] -{ #category : #tests } +{ #category : 'tests' } MicAgendaBlockTest >> testAgendaWithArgument [ "' diff --git a/src/Microdown-Agenda-Tests/MicAgendaGeneratorTest.class.st b/src/Microdown-Agenda-Tests/MicAgendaGeneratorTest.class.st index cde648ae..cdac03f6 100644 --- a/src/Microdown-Agenda-Tests/MicAgendaGeneratorTest.class.st +++ b/src/Microdown-Agenda-Tests/MicAgendaGeneratorTest.class.st @@ -2,8 +2,8 @@ This class contains tests but all the test are not correct beacaus we need to have a file in a repertory with the templates because if we don't have them we can't generate the calendar. " Class { - #name : #MicAgendaGeneratorTest, - #superclass : #ParametrizedTestCase, + #name : 'MicAgendaGeneratorTest', + #superclass : 'ParametrizedTestCase', #instVars : [ 'builder', 'parser', @@ -14,10 +14,11 @@ Class { #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Agenda-Tests' + #category : 'Microdown-Agenda-Tests', + #package : 'Microdown-Agenda-Tests' } -{ #category : #'building suites' } +{ #category : 'building suites' } MicAgendaGeneratorTest class >> testParameters [ ^ ParametrizedTestMatrix new @@ -27,7 +28,7 @@ MicAgendaGeneratorTest class >> testParameters [ yourself ] -{ #category : #exemple } +{ #category : 'exemple' } MicAgendaGeneratorTest >> agendaExempleMultiplesTalks [ ^ '> agendaExempleMultiplesTalks [ ] -{ #category : #exemple } +{ #category : 'exemple' } MicAgendaGeneratorTest >> agendaExempleOneTalk [ ^ '> agendaExempleOneTalk [ ] -{ #category : #exemple } +{ #category : 'exemple' } MicAgendaGeneratorTest >> agendaExempleWithRealInfo [ ^ '> agendaExempleWithRealInfo [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicAgendaGeneratorTest >> fileSystem: aFileSystem [ fileSystem := aFileSystem memory. ] -{ #category : #accessing } +{ #category : 'accessing' } MicAgendaGeneratorTest >> newLine: aNewLine [ (aNewLine = String cr) ifTrue:[ writer crAsNewLine ]. (aNewLine = String lf) ifTrue:[ writer lfAsNewLine ]. @@ -148,7 +149,7 @@ MicAgendaGeneratorTest >> newLine: aNewLine [ newLine := aNewLine ] -{ #category : #running } +{ #category : 'running' } MicAgendaGeneratorTest >> setUp [ super setUp. @@ -156,7 +157,7 @@ MicAgendaGeneratorTest >> setUp [ parser := Microdown new. ] -{ #category : #tests } +{ #category : 'tests' } MicAgendaGeneratorTest >> testAgendaAstIsCorrect [ | fs file ast agenda day segment| @@ -177,7 +178,7 @@ MicAgendaGeneratorTest >> testAgendaAstIsCorrect [ ] -{ #category : #tests } +{ #category : 'tests' } MicAgendaGeneratorTest >> testConvertMicFileCorrectly [ "Look at the class comment for more information about this test" @@ -254,7 +255,7 @@ MicAgendaGeneratorTest >> testConvertMicFileCorrectly [ ] -{ #category : #tests } +{ #category : 'tests' } MicAgendaGeneratorTest >> testConvertMicFileCorrectlyWithMultiplesTalks [ "Look at the class comment for more information about this test" @@ -332,7 +333,7 @@ MicAgendaGeneratorTest >> testConvertMicFileCorrectlyWithMultiplesTalks [ ] -{ #category : #tests } +{ #category : 'tests' } MicAgendaGeneratorTest >> testConvertMicFileCorrectlyWithOneTalk [ "Look at the class comment for more information about this test" @@ -371,7 +372,7 @@ MicAgendaGeneratorTest >> testConvertMicFileCorrectlyWithOneTalk [ ' ', newLine, newLine" ] -{ #category : #tests } +{ #category : 'tests' } MicAgendaGeneratorTest >> testConvertMicFileCorrectlyWithRealInfo [ "Look at the class comment for more information about this test" @@ -449,7 +450,7 @@ MicAgendaGeneratorTest >> testConvertMicFileCorrectlyWithRealInfo [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicAgendaGeneratorTest >> writer: aWriter [ writer := aWriter new ] diff --git a/src/Microdown-Agenda-Tests/MicDayBlockTest.class.st b/src/Microdown-Agenda-Tests/MicDayBlockTest.class.st index 06d9110e..ffe3f6a4 100644 --- a/src/Microdown-Agenda-Tests/MicDayBlockTest.class.st +++ b/src/Microdown-Agenda-Tests/MicDayBlockTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #MicDayBlockTest, - #superclass : #TestCase, + #name : 'MicDayBlockTest', + #superclass : 'TestCase', #instVars : [ 'builder', 'parser' @@ -8,10 +8,11 @@ Class { #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Agenda-Tests' + #category : 'Microdown-Agenda-Tests', + #package : 'Microdown-Agenda-Tests' } -{ #category : #running } +{ #category : 'running' } MicDayBlockTest >> setUp [ super setUp. @@ -19,7 +20,7 @@ MicDayBlockTest >> setUp [ parser := Microdown new. ] -{ #category : #tests } +{ #category : 'tests' } MicDayBlockTest >> testDay [ "' @@ -33,7 +34,7 @@ MicDayBlockTest >> testDay [ self assert: env environmentName equals: 'day' ] -{ #category : #tests } +{ #category : 'tests' } MicDayBlockTest >> testDayWithArgument [ "' diff --git a/src/Microdown-Agenda-Tests/MicSegmentBlockTest.class.st b/src/Microdown-Agenda-Tests/MicSegmentBlockTest.class.st index 7b71310e..1c1ce648 100644 --- a/src/Microdown-Agenda-Tests/MicSegmentBlockTest.class.st +++ b/src/Microdown-Agenda-Tests/MicSegmentBlockTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #MicSegmentBlockTest, - #superclass : #TestCase, + #name : 'MicSegmentBlockTest', + #superclass : 'TestCase', #instVars : [ 'builder', 'parser' @@ -8,10 +8,11 @@ Class { #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Agenda-Tests' + #category : 'Microdown-Agenda-Tests', + #package : 'Microdown-Agenda-Tests' } -{ #category : #running } +{ #category : 'running' } MicSegmentBlockTest >> setUp [ super setUp. @@ -19,7 +20,7 @@ MicSegmentBlockTest >> setUp [ parser := Microdown new. ] -{ #category : #tests } +{ #category : 'tests' } MicSegmentBlockTest >> testSegment [ "' @@ -33,7 +34,7 @@ MicSegmentBlockTest >> testSegment [ self assert: env environmentName equals: 'segment'. ] -{ #category : #tests } +{ #category : 'tests' } MicSegmentBlockTest >> testSegmentWithArgument [ "' diff --git a/src/Microdown-Agenda-Tests/package.st b/src/Microdown-Agenda-Tests/package.st index 584fe09c..f70a20ad 100644 --- a/src/Microdown-Agenda-Tests/package.st +++ b/src/Microdown-Agenda-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Agenda-Tests' } +Package { #name : 'Microdown-Agenda-Tests' } diff --git a/src/Microdown-Agenda/MicAbstractComponentBlock.class.st b/src/Microdown-Agenda/MicAbstractComponentBlock.class.st index a56ab599..e10d1fce 100644 --- a/src/Microdown-Agenda/MicAbstractComponentBlock.class.st +++ b/src/Microdown-Agenda/MicAbstractComponentBlock.class.st @@ -2,60 +2,61 @@ I am an abstractComponent which represent the standard behaviour of each components of a Segment. " Class { - #name : #MicAbstractComponentBlock, - #superclass : #MicSegmentBlock, - #category : #'Microdown-Agenda' + #name : 'MicAbstractComponentBlock', + #superclass : 'MicSegmentBlock', + #category : 'Microdown-Agenda', + #package : 'Microdown-Agenda' } -{ #category : #testing } +{ #category : 'testing' } MicAbstractComponentBlock class >> isAbstract [ ^ self == MicAbstractComponentBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractComponentBlock >> author [ ^ self arguments at: #author ifAbsent: [ 'Not Specified' ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractComponentBlock >> author: anAuthor [ arguments at: #author put: anAuthor ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractComponentBlock >> length [ ^ self arguments at: #length ifAbsent: [ 'There is no length' ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractComponentBlock >> length: aLength [ arguments at: #length put: aLength ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractComponentBlock >> room [ ^ self arguments at: #room ifAbsent: [ 'Not Specified' ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractComponentBlock >> room: aRoom [ arguments at: #room put: aRoom ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractComponentBlock >> subject [ ^ self arguments at: #subject ifAbsent: [ 'There is no subject' ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractComponentBlock >> subject: aSubject [ arguments at: #subject put: aSubject diff --git a/src/Microdown-Agenda/MicAgendaBlock.class.st b/src/Microdown-Agenda/MicAgendaBlock.class.st index 460f9c24..d88399a2 100644 --- a/src/Microdown-Agenda/MicAgendaBlock.class.st +++ b/src/Microdown-Agenda/MicAgendaBlock.class.st @@ -2,28 +2,29 @@ I represent an Agenda which contain the differents days which are my children. " Class { - #name : #MicAgendaBlock, - #superclass : #MicEnvironmentBlock, - #category : #'Microdown-Agenda' + #name : 'MicAgendaBlock', + #superclass : 'MicEnvironmentBlock', + #category : 'Microdown-Agenda', + #package : 'Microdown-Agenda' } -{ #category : #accessing } +{ #category : 'accessing' } MicAgendaBlock class >> tag [ ^ #agenda ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaBlock >> accept: aVisitor [ ^ aVisitor visitAgenda: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicAgendaBlock >> title [ ^ self arguments at: #title ifAbsent: [ 'There is no title' ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAgendaBlock >> title: aTitle [ arguments at: #title put: aTitle diff --git a/src/Microdown-Agenda/MicAgendaGenerator.class.st b/src/Microdown-Agenda/MicAgendaGenerator.class.st index c1ae9233..7fbc85a3 100644 --- a/src/Microdown-Agenda/MicAgendaGenerator.class.st +++ b/src/Microdown-Agenda/MicAgendaGenerator.class.st @@ -2,8 +2,8 @@ I generate HTML specificly for a calendar in HTML from a template and a microdown AST. " Class { - #name : #MicAgendaGenerator, - #superclass : #MicHTMLVisitor, + #name : 'MicAgendaGenerator', + #superclass : 'MicHTMLVisitor', #instVars : [ 'parentFile', 'time', @@ -16,10 +16,11 @@ Class { 'daysNumber', 'dayHeaderBlockTemplate' ], - #category : #'Microdown-Agenda' + #category : 'Microdown-Agenda', + #package : 'Microdown-Agenda' } -{ #category : #template } +{ #category : 'template' } MicAgendaGenerator class >> agendaTemplate: aNewLine [ | newLine | newLine := aNewLine asString. @@ -105,7 +106,7 @@ MicAgendaGenerator class >> agendaTemplate: aNewLine [ '' ] -{ #category : #template } +{ #category : 'template' } MicAgendaGenerator class >> dayHeaderBlockTemplate: aNewLine [ | newLine | @@ -119,7 +120,7 @@ MicAgendaGenerator class >> dayHeaderBlockTemplate: aNewLine [ ' ', newLine ] -{ #category : #template } +{ #category : 'template' } MicAgendaGenerator class >> dayTalksTemplate: aNewLine [ | newLine | @@ -141,7 +142,7 @@ MicAgendaGenerator class >> dayTalksTemplate: aNewLine [ ' ', newLine ] -{ #category : #template } +{ #category : 'template' } MicAgendaGenerator class >> talkTemplate: aNewLine [ | newLine | newLine := aNewLine asString. @@ -167,7 +168,7 @@ MicAgendaGenerator class >> talkTemplate: aNewLine [ ' ' ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaGenerator >> build: aScheduleFile [ | file fileReference| @@ -179,7 +180,7 @@ MicAgendaGenerator >> build: aScheduleFile [ fileReference writeStreamDo: [ :stream | stream nextPutAll: self contents ] ] -{ #category : #initialization } +{ #category : 'initialization' } MicAgendaGenerator >> initialize [ super initialize. @@ -190,7 +191,7 @@ MicAgendaGenerator >> initialize [ daysNumber := 0. ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaGenerator >> templateInitialization [ agendaTemplate := parentFile / 'Template/agendaTemplate.mustache' . @@ -199,19 +200,19 @@ MicAgendaGenerator >> templateInitialization [ talkTemplate := parentFile / 'Template/talkTemplate.mustache'. ] -{ #category : #accessing } +{ #category : 'accessing' } MicAgendaGenerator >> time [ ^ time ] -{ #category : #accessing } +{ #category : 'accessing' } MicAgendaGenerator >> time: aTime [ time := aTime ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaGenerator >> timePlus: aLength [ | currentHours currentMins addedTime nbHours | @@ -230,7 +231,7 @@ MicAgendaGenerator >> timePlus: aLength [ ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaGenerator >> visitAgenda: anAgenda [ | agenda | @@ -243,7 +244,7 @@ MicAgendaGenerator >> visitAgenda: anAgenda [ canvas nextPutAll: agenda ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaGenerator >> visitBreak: aBreak [ | length talk | @@ -259,7 +260,7 @@ MicAgendaGenerator >> visitBreak: aBreak [ talks := talks, talk. ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaGenerator >> visitDay: aDay [ | day dayBlock number numberDay active| @@ -285,7 +286,7 @@ MicAgendaGenerator >> visitDay: aDay [ talks := ''. ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaGenerator >> visitSegment: aSegment [ self time: aSegment start. @@ -293,7 +294,7 @@ MicAgendaGenerator >> visitSegment: aSegment [ self visitChildrenOf: aSegment. ] -{ #category : #visiting } +{ #category : 'visiting' } MicAgendaGenerator >> visitTalk: aTalk [ | length talk | diff --git a/src/Microdown-Agenda/MicBreakBlock.class.st b/src/Microdown-Agenda/MicBreakBlock.class.st index 7297fdf7..8f5237d3 100644 --- a/src/Microdown-Agenda/MicBreakBlock.class.st +++ b/src/Microdown-Agenda/MicBreakBlock.class.st @@ -2,22 +2,23 @@ I represent a Break in a Segment like a break for lunch or a coffee time for a certain amount of time at a certain place. " Class { - #name : #MicBreakBlock, - #superclass : #MicAbstractComponentBlock, - #category : #'Microdown-Agenda' + #name : 'MicBreakBlock', + #superclass : 'MicAbstractComponentBlock', + #category : 'Microdown-Agenda', + #package : 'Microdown-Agenda' } -{ #category : #accessing } +{ #category : 'accessing' } MicBreakBlock class >> tag [ ^ #break ] -{ #category : #visiting } +{ #category : 'visiting' } MicBreakBlock >> accept: aVisitor [ ^ aVisitor visitBreak: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicBreakBlock >> author [ ^ self arguments at: #author ifAbsent: [ '' ] diff --git a/src/Microdown-Agenda/MicDayBlock.class.st b/src/Microdown-Agenda/MicDayBlock.class.st index 869d22df..d68481fc 100644 --- a/src/Microdown-Agenda/MicDayBlock.class.st +++ b/src/Microdown-Agenda/MicDayBlock.class.st @@ -2,28 +2,29 @@ I represent a Day in a Agenda with all my differents segment which are my children. " Class { - #name : #MicDayBlock, - #superclass : #MicEnvironmentBlock, - #category : #'Microdown-Agenda' + #name : 'MicDayBlock', + #superclass : 'MicEnvironmentBlock', + #category : 'Microdown-Agenda', + #package : 'Microdown-Agenda' } -{ #category : #accessing } +{ #category : 'accessing' } MicDayBlock class >> tag [ ^ #day ] -{ #category : #visiting } +{ #category : 'visiting' } MicDayBlock >> accept: aVisitor [ ^ aVisitor visitDay: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicDayBlock >> start [ ^ self arguments at: #start ifAbsent: [ 'There is no start' ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicDayBlock >> start: aStart [ arguments at: #start put: aStart diff --git a/src/Microdown-Agenda/MicSegmentBlock.class.st b/src/Microdown-Agenda/MicSegmentBlock.class.st index 6a59a46b..8fb8b436 100644 --- a/src/Microdown-Agenda/MicSegmentBlock.class.st +++ b/src/Microdown-Agenda/MicSegmentBlock.class.st @@ -2,28 +2,29 @@ I represent a Segment of a Day which i contains all the differents components which are my children. " Class { - #name : #MicSegmentBlock, - #superclass : #MicEnvironmentBlock, - #category : #'Microdown-Agenda' + #name : 'MicSegmentBlock', + #superclass : 'MicEnvironmentBlock', + #category : 'Microdown-Agenda', + #package : 'Microdown-Agenda' } -{ #category : #accessing } +{ #category : 'accessing' } MicSegmentBlock class >> tag [ ^ #segment ] -{ #category : #visiting } +{ #category : 'visiting' } MicSegmentBlock >> accept: aVisitor [ ^ aVisitor visitSegment: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicSegmentBlock >> start [ ^ self arguments at: #start ifAbsent: [ 'There is no start' ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicSegmentBlock >> start: aStart [ arguments at: #start put: aStart diff --git a/src/Microdown-Agenda/MicTalkBlock.class.st b/src/Microdown-Agenda/MicTalkBlock.class.st index a6898e50..58ce8172 100644 --- a/src/Microdown-Agenda/MicTalkBlock.class.st +++ b/src/Microdown-Agenda/MicTalkBlock.class.st @@ -2,17 +2,18 @@ I represent a Talk in a Segment like a presentation of a new tool or projet by someone for a certains amount of time at a certain place. " Class { - #name : #MicTalkBlock, - #superclass : #MicAbstractComponentBlock, - #category : #'Microdown-Agenda' + #name : 'MicTalkBlock', + #superclass : 'MicAbstractComponentBlock', + #category : 'Microdown-Agenda', + #package : 'Microdown-Agenda' } -{ #category : #accessing } +{ #category : 'accessing' } MicTalkBlock class >> tag [ ^ #talk ] -{ #category : #visiting } +{ #category : 'visiting' } MicTalkBlock >> accept: aVisitor [ ^ aVisitor visitTalk: self ] diff --git a/src/Microdown-Agenda/package.st b/src/Microdown-Agenda/package.st index 6576cf86..25bb2e85 100644 --- a/src/Microdown-Agenda/package.st +++ b/src/Microdown-Agenda/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Agenda' } +Package { #name : 'Microdown-Agenda' } diff --git a/src/Microdown-BeamerExporter-Tests/MicBeamerWriterTest.class.st b/src/Microdown-BeamerExporter-Tests/MicBeamerWriterTest.class.st index f1665b01..a57b5139 100644 --- a/src/Microdown-BeamerExporter-Tests/MicBeamerWriterTest.class.st +++ b/src/Microdown-BeamerExporter-Tests/MicBeamerWriterTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicBeamerWriterTest, - #superclass : #MicLaTeXWriterTest, - #category : #'Microdown-BeamerExporter-Tests' + #name : 'MicBeamerWriterTest', + #superclass : 'MicLaTeXWriterTest', + #category : 'Microdown-BeamerExporter-Tests', + #package : 'Microdown-BeamerExporter-Tests' } -{ #category : #tests } +{ #category : 'tests' } MicBeamerWriterTest class >> testParameters [ ^ ParametrizedTestMatrix new @@ -15,12 +16,12 @@ MicBeamerWriterTest class >> testParameters [ yourself ] -{ #category : #running } +{ #category : 'running' } MicBeamerWriterTest >> actualClass [ ^ MicBeamerWriter ] -{ #category : #tests } +{ #category : 'tests' } MicBeamerWriterTest >> testCode [ self writeFor: (factory codeblockNoParamBody: 'this is a code'). @@ -29,7 +30,7 @@ MicBeamerWriterTest >> testCode [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicBeamerWriterTest >> testCodeWithCaption [ self writeFor: (factory codeblock: 'caption=Pharo is **cool**' body: 'this is a code'). @@ -38,7 +39,7 @@ MicBeamerWriterTest >> testCodeWithCaption [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicBeamerWriterTest >> testCodeWithLabel [ self writeFor: (factory codeblock: 'label=Pharo' body: 'this is a code'). @@ -47,7 +48,7 @@ MicBeamerWriterTest >> testCodeWithLabel [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicBeamerWriterTest >> testColumn [ self writeFor: (factory columnSample). @@ -56,7 +57,7 @@ MicBeamerWriterTest >> testColumn [ '\end{column}', newLine, newLine ] -{ #category : #tests } +{ #category : 'tests' } MicBeamerWriterTest >> testColumns [ self writeFor: (factory columnsSample). @@ -64,7 +65,7 @@ MicBeamerWriterTest >> testColumns [ '\end{columns}', newLine , newLine ] -{ #category : #tests } +{ #category : 'tests' } MicBeamerWriterTest >> testColumnsWithChildren [ self writeFor: factory columnsWithChildrenSample. @@ -78,7 +79,7 @@ MicBeamerWriterTest >> testColumnsWithChildren [ '\end{columns}', newLine , newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicBeamerWriterTest >> testFigure [ self writeFor: factory figureSample. @@ -87,7 +88,7 @@ MicBeamerWriterTest >> testFigure [ '\includegraphics[width=0.8\textwidth]{/anUrl}\end{center}', newLine, newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicBeamerWriterTest >> testFigureBold [ "in beamer we do not display caption so bld and the rest goes away." self writeFor: factory figureBoldSample. @@ -96,7 +97,7 @@ MicBeamerWriterTest >> testFigureBold [ '\includegraphics[width=0.8\textwidth]{/anUrl}\end{center}', newLine , newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicBeamerWriterTest >> testFigureRealSample [ self writeFor: factory figureRealSample. @@ -105,7 +106,7 @@ MicBeamerWriterTest >> testFigureRealSample [ '\includegraphics[width=0.8\textwidth]{figures/logo.png}\end{center}', newLine , newLine ] -{ #category : #tests } +{ #category : 'tests' } MicBeamerWriterTest >> testFrameWithoutOption [ self diff --git a/src/Microdown-BeamerExporter-Tests/package.st b/src/Microdown-BeamerExporter-Tests/package.st index 9f918ba2..1a7874ca 100644 --- a/src/Microdown-BeamerExporter-Tests/package.st +++ b/src/Microdown-BeamerExporter-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-BeamerExporter-Tests' } +Package { #name : 'Microdown-BeamerExporter-Tests' } diff --git a/src/Microdown-BeamerExporter/MicBeamerWriter.class.st b/src/Microdown-BeamerExporter/MicBeamerWriter.class.st index 9e645527..4f672c20 100644 --- a/src/Microdown-BeamerExporter/MicBeamerWriter.class.st +++ b/src/Microdown-BeamerExporter/MicBeamerWriter.class.st @@ -47,12 +47,13 @@ Metacello new ``` " Class { - #name : #MicBeamerWriter, - #superclass : #MicLaTeXWriter, - #category : #'Microdown-BeamerExporter' + #name : 'MicBeamerWriter', + #superclass : 'MicLaTeXWriter', + #category : 'Microdown-BeamerExporter', + #package : 'Microdown-BeamerExporter' } -{ #category : #'basic ressources' } +{ #category : 'basic ressources' } MicBeamerWriter class >> basicTemplateForTest [ ^ '% -*- mode: latex; -*- mustache tags: {{=« »=}} «! the ''&'' below prevents HTML escaping. » @@ -111,20 +112,20 @@ MicBeamerWriter class >> basicTemplateForTest [ \end{document}' ] -{ #category : #accessing } +{ #category : 'accessing' } MicBeamerWriter class >> writerName [ ^ #micBeamer ] -{ #category : #helpers } +{ #category : 'helpers' } MicBeamerWriter >> createFrametitle: aTitle [ canvas command name: 'frametitle'; parameter: aTitle ] -{ #category : #helpers } +{ #category : 'helpers' } MicBeamerWriter >> createLinkToLabelWithAlias: anInternalLink [ canvas command name: 'hyperlink'; @@ -132,12 +133,12 @@ MicBeamerWriter >> createLinkToLabelWithAlias: anInternalLink [ parameter: [ canvas raw: anInternalLink alias ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicBeamerWriter >> folderName [ ^ #beamer ] -{ #category : #helpers } +{ #category : 'helpers' } MicBeamerWriter >> sectionOptionFrom: level To: depth On: parameters [ parameters add: @@ -156,12 +157,12 @@ MicBeamerWriter >> sectionOptionFrom: level To: depth On: parameters [ ifFalse: [ 'subsubsectionstyle=hide/hide/hide' ]) ] -{ #category : #accessing } +{ #category : 'accessing' } MicBeamerWriter >> templateForConfiguration: aConfiguration [ ^ 'presentation.template' ] -{ #category : #'blocks - code' } +{ #category : 'blocks - code' } MicBeamerWriter >> visitCode: aCodeBlock [ | env | env := (aCodeBlock hasCaption and: [ aCodeBlock hasLabel ]) @@ -192,7 +193,7 @@ MicBeamerWriter >> visitCode: aCodeBlock [ env with: [ canvas nextPutAllLines: aCodeBlock body. canvas newLine ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicBeamerWriter >> visitColumn: aColumn [ canvas environment name: 'column'; @@ -204,7 +205,7 @@ MicBeamerWriter >> visitColumn: aColumn [ canvas newLine ] -{ #category : #visiting } +{ #category : 'visiting' } MicBeamerWriter >> visitColumns: aColumns [ canvas environment name: 'columns'; @@ -213,14 +214,14 @@ MicBeamerWriter >> visitColumns: aColumns [ canvas newLine ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicBeamerWriter >> visitFigure: aFigure [ canvas environment name: 'center'; with: [ self includeGraphicsFor: aFigure ] ] -{ #category : #'visiting - extensions' } +{ #category : 'visiting - extensions' } MicBeamerWriter >> visitSlide: aSlide [ canvas newLine. canvas environment diff --git a/src/Microdown-BeamerExporter/package.st b/src/Microdown-BeamerExporter/package.st index 83e25826..69755e11 100644 --- a/src/Microdown-BeamerExporter/package.st +++ b/src/Microdown-BeamerExporter/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-BeamerExporter' } +Package { #name : 'Microdown-BeamerExporter' } diff --git a/src/Microdown-Calypso/ManifestMicrodownCalypso.class.st b/src/Microdown-Calypso/ManifestMicrodownCalypso.class.st index 38879c26..0d8e4bb0 100644 --- a/src/Microdown-Calypso/ManifestMicrodownCalypso.class.st +++ b/src/Microdown-Calypso/ManifestMicrodownCalypso.class.st @@ -2,7 +2,9 @@ I provide some extensions to the class browser Calypso. I allow rendering of package and class comments in MicroDown. " Class { - #name : #ManifestMicrodownCalypso, - #superclass : #PackageManifest, - #category : #'Microdown-Calypso-Manifest' + #name : 'ManifestMicrodownCalypso', + #superclass : 'PackageManifest', + #category : 'Microdown-Calypso-Manifest', + #package : 'Microdown-Calypso', + #tag : 'Manifest' } diff --git a/src/Microdown-Calypso/package.st b/src/Microdown-Calypso/package.st index c0836798..323b4e47 100644 --- a/src/Microdown-Calypso/package.st +++ b/src/Microdown-Calypso/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Calypso' } +Package { #name : 'Microdown-Calypso' } diff --git a/src/Microdown-Evaluator-Tests/MicCodeblockEvaluatorTest.class.st b/src/Microdown-Evaluator-Tests/MicCodeblockEvaluatorTest.class.st index 44b42c86..ce92e0da 100644 --- a/src/Microdown-Evaluator-Tests/MicCodeblockEvaluatorTest.class.st +++ b/src/Microdown-Evaluator-Tests/MicCodeblockEvaluatorTest.class.st @@ -1,15 +1,16 @@ Class { - #name : #MicCodeblockEvaluatorTest, - #superclass : #TestCase, - #category : #'Microdown-Evaluator-Tests' + #name : 'MicCodeblockEvaluatorTest', + #superclass : 'TestCase', + #category : 'Microdown-Evaluator-Tests', + #package : 'Microdown-Evaluator-Tests' } -{ #category : #private } +{ #category : 'private' } MicCodeblockEvaluatorTest >> actualClass [ ^ MicCodeblockEvaluator ] -{ #category : #private } +{ #category : 'private' } MicCodeblockEvaluatorTest >> testCodeblockWithEvalExecuteBody [ | input | input := MicRootBlock new @@ -27,7 +28,7 @@ MicCodeblockEvaluatorTest >> testCodeblockWithEvalExecuteBody [ self assert: input children first children first children first text equals: 'test' ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockEvaluatorTest >> testCodeblockWithProblematicEval [ | input | input := MicRootBlock new @@ -42,7 +43,7 @@ MicCodeblockEvaluatorTest >> testCodeblockWithProblematicEval [ equals: 'Instance of Object class did not understand #SomethingThatIsNotAMethod' ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockEvaluatorTest >> testCodeblockWithoutEval [ | input | input := MicRootBlock new @@ -56,7 +57,7 @@ MicCodeblockEvaluatorTest >> testCodeblockWithoutEval [ self assert: input children first body equals: 'stream nextPut: $h; nextPut: $e; nextPut: $l; nextPutAll: ''lo''' ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockEvaluatorTest >> testParsedCodeblockEvaluated [ | input | input := MicCodeblockEvaluator new visit: (Microdown @@ -69,7 +70,7 @@ stream nextPutAll: ''Hello world'' self assert: input children first text equals: 'Hello world' ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockEvaluatorTest >> testParsedCodeblockNonEvaluated [ | input | input := MicCodeblockEvaluator new visit: (Microdown diff --git a/src/Microdown-Evaluator-Tests/package.st b/src/Microdown-Evaluator-Tests/package.st index e8b60ca0..9a9f4563 100644 --- a/src/Microdown-Evaluator-Tests/package.st +++ b/src/Microdown-Evaluator-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Evaluator-Tests' } +Package { #name : 'Microdown-Evaluator-Tests' } diff --git a/src/Microdown-Evaluator/MicCodeBlock.extension.st b/src/Microdown-Evaluator/MicCodeBlock.extension.st index b190c01e..9cf4050b 100644 --- a/src/Microdown-Evaluator/MicCodeBlock.extension.st +++ b/src/Microdown-Evaluator/MicCodeBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicCodeBlock } +Extension { #name : 'MicCodeBlock' } -{ #category : #'*Microdown-Evaluator' } +{ #category : '*Microdown-Evaluator' } MicCodeBlock >> eval: aBoolean [ "the string conversion is due to the fact that the arguments are not converted so normally the parser returns strings and not boolean. @@ -11,7 +11,7 @@ MicCodeBlock >> eval: aBoolean [ ] -{ #category : #'*Microdown-Evaluator' } +{ #category : '*Microdown-Evaluator' } MicCodeBlock >> evaluate [ | content | @@ -21,7 +21,7 @@ MicCodeBlock >> evaluate [ do: [ :e | MicBoldFormatBlock new children: { (MicTextBlock new substring: e messageText) } ] ] -{ #category : #'*Microdown-Evaluator' } +{ #category : '*Microdown-Evaluator' } MicCodeBlock >> evaluationString [ ^ String streamContents: [ :stream | @@ -40,7 +40,7 @@ MicCodeBlock >> evaluationString [ nextPutAll: e description ] ] ] -{ #category : #'*Microdown-Evaluator' } +{ #category : '*Microdown-Evaluator' } MicCodeBlock >> isEvaluated [ arguments at: #eval ifAbsent: [ ^ false ]. ^ (arguments at: #eval) = 'true' diff --git a/src/Microdown-Evaluator/MicCodeblockEvaluator.class.st b/src/Microdown-Evaluator/MicCodeblockEvaluator.class.st index a8b634b1..0a9e641a 100644 --- a/src/Microdown-Evaluator/MicCodeblockEvaluator.class.st +++ b/src/Microdown-Evaluator/MicCodeblockEvaluator.class.st @@ -10,12 +10,13 @@ stream nextPutAll: ''Hello world'' ``` " Class { - #name : #MicCodeblockEvaluator, - #superclass : #MicNodeTransformer, - #category : #'Microdown-Evaluator' + #name : 'MicCodeblockEvaluator', + #superclass : 'MicNodeTransformer', + #category : 'Microdown-Evaluator', + #package : 'Microdown-Evaluator' } -{ #category : #visiting } +{ #category : 'visiting' } MicCodeblockEvaluator >> visitCode: aCodeBlock [ aCodeBlock isEvaluated diff --git a/src/Microdown-Evaluator/MicCodeblockEvaluatorEnv.class.st b/src/Microdown-Evaluator/MicCodeblockEvaluatorEnv.class.st index 94f05ee7..af218619 100644 --- a/src/Microdown-Evaluator/MicCodeblockEvaluatorEnv.class.st +++ b/src/Microdown-Evaluator/MicCodeblockEvaluatorEnv.class.st @@ -6,15 +6,16 @@ the user can use the stream to generate a different body of the codeblock using stream messages. " Class { - #name : #MicCodeblockEvaluatorEnv, - #superclass : #Object, + #name : 'MicCodeblockEvaluatorEnv', + #superclass : 'Object', #instVars : [ 'stream' ], - #category : #'Microdown-Evaluator' + #category : 'Microdown-Evaluator', + #package : 'Microdown-Evaluator' } -{ #category : #initialization } +{ #category : 'initialization' } MicCodeblockEvaluatorEnv >> setStream: aStream [ stream := aStream ] diff --git a/src/Microdown-Evaluator/MicCompilationContext.class.st b/src/Microdown-Evaluator/MicCompilationContext.class.st index c4f6b0a0..f9a45ffd 100644 --- a/src/Microdown-Evaluator/MicCompilationContext.class.st +++ b/src/Microdown-Evaluator/MicCompilationContext.class.st @@ -1,31 +1,32 @@ Class { - #name : #MicCompilationContext, - #superclass : #MicElement, + #name : 'MicCompilationContext', + #superclass : 'MicElement', #instVars : [ 'configuration', 'input' ], - #category : #'Microdown-Evaluator' + #category : 'Microdown-Evaluator', + #package : 'Microdown-Evaluator' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicCompilationContext class >> configuration: aConfiguration [ ^ self new configuration: aConfiguration ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicCompilationContext class >> isAbstract [ ^ false ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicCompilationContext class >> withDocument: aDocument [ ^ self new input: aDocument; yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicCompilationContext class >> withDocument: aDocument withConfiguration: aConfiguration [ ^ self new input: aDocument; @@ -33,22 +34,22 @@ MicCompilationContext class >> withDocument: aDocument withConfiguration: aConfi yourself ] -{ #category : #accessing } +{ #category : 'accessing' } MicCompilationContext >> configuration [ ^ configuration ] -{ #category : #accessing } +{ #category : 'accessing' } MicCompilationContext >> configuration: aConfiguration [ configuration := aConfiguration ] -{ #category : #accessing } +{ #category : 'accessing' } MicCompilationContext >> input [ ^ input ] -{ #category : #accessing } +{ #category : 'accessing' } MicCompilationContext >> input: anObject [ input := anObject ] diff --git a/src/Microdown-Evaluator/package.st b/src/Microdown-Evaluator/package.st index 7f347f1a..0166eaa6 100644 --- a/src/Microdown-Evaluator/package.st +++ b/src/Microdown-Evaluator/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Evaluator' } +Package { #name : 'Microdown-Evaluator' } diff --git a/src/Microdown-H5P/MicH5PCommandLine.class.st b/src/Microdown-H5P/MicH5PCommandLine.class.st index eb752c05..15c75968 100644 --- a/src/Microdown-H5P/MicH5PCommandLine.class.st +++ b/src/Microdown-H5P/MicH5PCommandLine.class.st @@ -4,12 +4,13 @@ ``` " Class { - #name : #MicH5PCommandLine, - #superclass : #ClapApplication, - #category : #'Microdown-H5P' + #name : 'MicH5PCommandLine', + #superclass : 'ClapApplication', + #category : 'Microdown-H5P', + #package : 'Microdown-H5P' } -{ #category : #'command line' } +{ #category : 'command line' } MicH5PCommandLine class >> h5p [ @@ -23,12 +24,12 @@ MicH5PCommandLine class >> h5p [ (self with: args) execute ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicH5PCommandLine >> argumentAt: identifier [ ^ (arguments at: identifier) value: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicH5PCommandLine >> execute [ MicPictureBasedWriter new diff --git a/src/Microdown-H5P/MicH5PTemplateWriter.class.st b/src/Microdown-H5P/MicH5PTemplateWriter.class.st index 1e934c7d..69996eb9 100644 --- a/src/Microdown-H5P/MicH5PTemplateWriter.class.st +++ b/src/Microdown-H5P/MicH5PTemplateWriter.class.st @@ -97,12 +97,13 @@ params"""":{ } " Class { - #name : #MicH5PTemplateWriter, - #superclass : #MicDocumentWriter, - #category : #'Microdown-H5P' + #name : 'MicH5PTemplateWriter', + #superclass : 'MicDocumentWriter', + #category : 'Microdown-H5P', + #package : 'Microdown-H5P' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } MicH5PTemplateWriter class >> docString [ "since we may lose class comment..." ^ 'I''m a slide converter to a limited subset of H5P. @@ -133,12 +134,12 @@ params"":{ }' ] -{ #category : #initialization } +{ #category : 'initialization' } MicH5PTemplateWriter >> canvasClass [ ^ MicHTMLCanvas ] -{ #category : #'static document parts' } +{ #category : 'static document parts' } MicH5PTemplateWriter >> creditSlide [ ^ '{ @@ -388,7 +389,7 @@ MicH5PTemplateWriter >> creditSlide [ }' ] -{ #category : #'to debug generation' } +{ #category : 'to debug generation' } MicH5PTemplateWriter >> fillTemplateWithVariables [ "self new fillTemplateWithVariables" @@ -403,7 +404,7 @@ MicH5PTemplateWriter >> fillTemplateWithVariables [ }) asDictionary. ] -{ #category : #'to debug generation' } +{ #category : 'to debug generation' } MicH5PTemplateWriter >> fillTemplateWithVariables2 [ "self new fillTemplateWithVariables" @@ -418,7 +419,7 @@ MicH5PTemplateWriter >> fillTemplateWithVariables2 [ }) asDictionary. ] -{ #category : #actions } +{ #category : 'actions' } MicH5PTemplateWriter >> fillTemplateWithVariables: aMicPresentation [ "aMicPresentation is a collection with metadata and slides." @@ -437,7 +438,7 @@ MicH5PTemplateWriter >> fillTemplateWithVariables: aMicPresentation [ }) asDictionary. ] -{ #category : #'to debug generation' } +{ #category : 'to debug generation' } MicH5PTemplateWriter >> fillUpOneSlide [ " works too" "self new fillUpOneSlide" @@ -452,7 +453,7 @@ MicH5PTemplateWriter >> fillUpOneSlide [ ] -{ #category : #'to debug generation' } +{ #category : 'to debug generation' } MicH5PTemplateWriter >> fillUpOneSlide2 [ "works" "self new fillUpOneSlide" @@ -467,7 +468,7 @@ MicH5PTemplateWriter >> fillUpOneSlide2 [ ] -{ #category : #actions } +{ #category : 'actions' } MicH5PTemplateWriter >> fillUpOneSlide: aSlide [ | oneSlideWriter | @@ -483,7 +484,7 @@ MicH5PTemplateWriter >> fillUpOneSlide: aSlide [ ] -{ #category : #actions } +{ #category : 'actions' } MicH5PTemplateWriter >> fillUpSlides: aCollection [ aCollection @@ -492,7 +493,7 @@ MicH5PTemplateWriter >> fillUpSlides: aCollection [ ] -{ #category : #'old working templates' } +{ #category : 'old working templates' } MicH5PTemplateWriter >> fullTemplateString [ ^ '{ "presentation":{ @@ -1170,7 +1171,7 @@ MicH5PTemplateWriter >> fullTemplateString [ }' ] -{ #category : #'old working templates' } +{ #category : 'old working templates' } MicH5PTemplateWriter >> fullTemplateString2 [ "Working too" ^ '{ @@ -1945,7 +1946,7 @@ MicH5PTemplateWriter >> fullTemplateString2 [ }' ] -{ #category : #'old working templates' } +{ #category : 'old working templates' } MicH5PTemplateWriter >> fullTemplateString3 [ "working too" ^ '{ @@ -2693,7 +2694,7 @@ MicH5PTemplateWriter >> fullTemplateString3 [ }' ] -{ #category : #'old working templates' } +{ #category : 'old working templates' } MicH5PTemplateWriter >> fullTemplateString4 [ "no subcomponentid" ^ '{ @@ -3421,7 +3422,7 @@ MicH5PTemplateWriter >> fullTemplateString4 [ }' ] -{ #category : #'old working templates' } +{ #category : 'old working templates' } MicH5PTemplateWriter >> fullTemplateString5 [ "Cleaned subcomponents removed some extra space" @@ -4103,7 +4104,7 @@ MicH5PTemplateWriter >> fullTemplateString5 [ }' ] -{ #category : #'working templates with parameters' } +{ #category : 'working templates with parameters' } MicH5PTemplateWriter >> fullTemplateStringParam [ "with slides and credit variables." ^ '{ @@ -4375,7 +4376,7 @@ MicH5PTemplateWriter >> fullTemplateStringParam [ }' ] -{ #category : #'working templates with parameters' } +{ #category : 'working templates with parameters' } MicH5PTemplateWriter >> fullTemplateStringParam2 [ "This one is working" ^ '{ @@ -4811,7 +4812,7 @@ MicH5PTemplateWriter >> fullTemplateStringParam2 [ }' ] -{ #category : #'working templates with parameters' } +{ #category : 'working templates with parameters' } MicH5PTemplateWriter >> fullTemplateStringParam3 [ "with slides and credit variables." ^ '{ @@ -5083,7 +5084,7 @@ MicH5PTemplateWriter >> fullTemplateStringParam3 [ }' ] -{ #category : #'working templates with parameters' } +{ #category : 'working templates with parameters' } MicH5PTemplateWriter >> slideTemplate [ ^ '{ @@ -5150,7 +5151,7 @@ MicH5PTemplateWriter >> slideTemplate [ }' ] -{ #category : #visiting } +{ #category : 'visiting' } MicH5PTemplateWriter >> visitCode: aCodeBlock [ canvas nextPutAll: '
'.
  	aCodeBlock body do: [ :each | each = Character cr ifTrue: [ canvas nextPutAll: '\n' ]
@@ -5158,7 +5159,7 @@ MicH5PTemplateWriter >> visitCode: aCodeBlock [
 	canvas nextPutAll: '\n
\n'. ] -{ #category : #visiting } +{ #category : 'visiting' } MicH5PTemplateWriter >> visitFigure: aFigureBlock [ @@ -5201,7 +5202,7 @@ MicH5PTemplateWriter >> visitFigure: aFigureBlock [ }' ] -{ #category : #visiting } +{ #category : 'visiting' } MicH5PTemplateWriter >> visitOrderedList: anOrderedList [ canvas nextPutAll: '
    \n\t'. @@ -5209,7 +5210,7 @@ MicH5PTemplateWriter >> visitOrderedList: anOrderedList [ canvas nextPutAll: '\n<\ol>\n'. ] -{ #category : #visiting } +{ #category : 'visiting' } MicH5PTemplateWriter >> visitUnorderedList: anOrderedList [ canvas nextPutAll: '
      \n\t'. @@ -5217,7 +5218,7 @@ MicH5PTemplateWriter >> visitUnorderedList: anOrderedList [ canvas nextPutAll: '\n
    \n'. ] -{ #category : #visiting } +{ #category : 'visiting' } MicH5PTemplateWriter >> visitUnorderedListItem: anUnorderedListItem [ canvas nextPutAll: '
  1. '. @@ -5226,7 +5227,7 @@ MicH5PTemplateWriter >> visitUnorderedListItem: anUnorderedListItem [ ] -{ #category : #'to debug generation' } +{ #category : 'to debug generation' } MicH5PTemplateWriter >> writeContentJSONOnDisk [ "self new writeContentJSONOnDisk" @@ -5236,7 +5237,7 @@ MicH5PTemplateWriter >> writeContentJSONOnDisk [ writeStreamDo: [ :str | str nextPutAll: self fillTemplateWithVariables ] ] -{ #category : #actions } +{ #category : 'actions' } MicH5PTemplateWriter >> writeContentJSONOnDisk: aMicDocument [ "self new writeContentJSONOnDisk: (Microdown parse: MicH5PTemplateWriterTest new mainSlideInMicrodown, MicH5PTemplateWriterTest new oneSlideWithCodeInMicrodown )" '/Users/ducasse/Workspace/FirstCircle/MyBooks/Bk-Writing/AdvancedOODesign/h5p/pharo-Template-withVariableNames2/content/content.json' asFileReference ensureDelete. diff --git a/src/Microdown-H5P/MicH5PTemplateWriterTest.class.st b/src/Microdown-H5P/MicH5PTemplateWriterTest.class.st index 2b3dde23..c5593583 100644 --- a/src/Microdown-H5P/MicH5PTemplateWriterTest.class.st +++ b/src/Microdown-H5P/MicH5PTemplateWriterTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicH5PTemplateWriterTest, - #superclass : #TestCase, - #category : #'Microdown-H5P' + #name : 'MicH5PTemplateWriterTest', + #superclass : 'TestCase', + #category : 'Microdown-H5P', + #package : 'Microdown-H5P' } -{ #category : #sample } +{ #category : 'sample' } MicH5PTemplateWriterTest >> mainSlideInMicrodown [ ^ ' @@ -17,7 +18,7 @@ MicH5PTemplateWriterTest >> mainSlideInMicrodown [ ' ] -{ #category : #sample } +{ #category : 'sample' } MicH5PTemplateWriterTest >> oneSlideWithCodeInMicrodown [ ^ ' @@ -34,13 +35,13 @@ SpTextInputFieldWithValidation >> validateInto: aValidationReport !>' ] -{ #category : #sample } +{ #category : 'sample' } MicH5PTemplateWriterTest >> presentationInMicrodown [ ^ self mainSlideInMicrodown , self twoSlidesInMicrodown ] -{ #category : #sample } +{ #category : 'sample' } MicH5PTemplateWriterTest >> slideInMicrodown [ ^ ' @@ -56,7 +57,7 @@ MicH5PTemplateWriterTest >> slideInMicrodown [ ' ] -{ #category : #sample } +{ #category : 'sample' } MicH5PTemplateWriterTest >> slideInMicrodownWithCode [ ^ ' @@ -80,7 +81,7 @@ testFoo ' ] -{ #category : #sample } +{ #category : 'sample' } MicH5PTemplateWriterTest >> slideInMicrodownWithSimpleCode [ ^ ' @@ -97,7 +98,7 @@ testMethod ' ] -{ #category : #sample } +{ #category : 'sample' } MicH5PTemplateWriterTest >> slideWithFigure [ ^ ' @@ -109,7 +110,7 @@ MicH5PTemplateWriterTest >> slideWithFigure [ ' ] -{ #category : #tests } +{ #category : 'tests' } MicH5PTemplateWriterTest >> testNSlide [ | doc h5p | @@ -242,7 +243,7 @@ MicH5PTemplateWriterTest >> testNSlide [ }' ] -{ #category : #tests } +{ #category : 'tests' } MicH5PTemplateWriterTest >> testOneSlide [ | doc h5p | @@ -312,7 +313,7 @@ MicH5PTemplateWriterTest >> testOneSlide [ }' ] -{ #category : #'low level visitor tests' } +{ #category : 'low level visitor tests' } MicH5PTemplateWriterTest >> testOneSlideBodyWithBullets [ | doc h5p | @@ -322,7 +323,7 @@ MicH5PTemplateWriterTest >> testOneSlideBodyWithBullets [ self assert: h5p contents equals: '
      \n\t
    • slide 1 bullet 1
    • \n\t
    • slide 1 bullet 2
    • \n\t
    • slide 1 bullet 3
    • \n\t\n
    \n' ] -{ #category : #'low level visitor tests' } +{ #category : 'low level visitor tests' } MicH5PTemplateWriterTest >> testOneSlideBodyWithCode [ | doc h5p | @@ -332,7 +333,7 @@ MicH5PTemplateWriterTest >> testOneSlideBodyWithCode [ self assert: h5p contents equals: '
    testMethod\n self assert: 4 foo equals: 55\n
    \n
    testFoo\n   self assertSpace.\n   self assertSpace2\n   ^ self\n
    \n' ] -{ #category : #'low level visitor tests' } +{ #category : 'low level visitor tests' } MicH5PTemplateWriterTest >> testOneSlideBodyWithSimpleCode [ | doc h5p | @@ -342,7 +343,7 @@ MicH5PTemplateWriterTest >> testOneSlideBodyWithSimpleCode [ self assert: h5p contents equals: '
    testMethod\n self assert: 4 foo equals: 55\n
    \n' ] -{ #category : #tests } +{ #category : 'tests' } MicH5PTemplateWriterTest >> testOneSlideWithOneFigure [ | doc h5p | @@ -389,7 +390,7 @@ MicH5PTemplateWriterTest >> testOneSlideWithOneFigure [ ] -{ #category : #tests } +{ #category : 'tests' } MicH5PTemplateWriterTest >> testSlides [ | doc | @@ -417,7 +418,7 @@ MicH5PTemplateWriterTest >> testSlides [ !>' ] -{ #category : #sample } +{ #category : 'sample' } MicH5PTemplateWriterTest >> twoSlidesInMicrodown [ ^ self slideInMicrodown, ' diff --git a/src/Microdown-H5P/MicJPEGH5PTemplateWriter.class.st b/src/Microdown-H5P/MicJPEGH5PTemplateWriter.class.st index 8fdcc321..48c3864e 100644 --- a/src/Microdown-H5P/MicJPEGH5PTemplateWriter.class.st +++ b/src/Microdown-H5P/MicJPEGH5PTemplateWriter.class.st @@ -3,12 +3,13 @@ MicJPEGH5PTemplateWriter new writeContentJSONOnDisk: (Microdown parse: MicH5PTemplateWriterTest new mainSlideInMicrodown, MicH5PTemplateWriterTest new oneSlideWithCodeInMicrodown ) " Class { - #name : #MicJPEGH5PTemplateWriter, - #superclass : #MicH5PTemplateWriter, - #category : #'Microdown-H5P' + #name : 'MicJPEGH5PTemplateWriter', + #superclass : 'MicH5PTemplateWriter', + #category : 'Microdown-H5P', + #package : 'Microdown-H5P' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } MicJPEGH5PTemplateWriter >> presentationString [ ^ '{ @@ -140,7 +141,7 @@ MicJPEGH5PTemplateWriter >> presentationString [ ' ] -{ #category : #'working templates with parameters' } +{ #category : 'working templates with parameters' } MicJPEGH5PTemplateWriter >> slideTemplate [ "in this version we only embed jpeg" diff --git a/src/Microdown-H5P/MicPictureBasedWriter.class.st b/src/Microdown-H5P/MicPictureBasedWriter.class.st index 0cfadd3d..5bfb0623 100644 --- a/src/Microdown-H5P/MicPictureBasedWriter.class.st +++ b/src/Microdown-H5P/MicPictureBasedWriter.class.st @@ -57,18 +57,19 @@ MicPictureBasedWriter new " Class { - #name : #MicPictureBasedWriter, - #superclass : #Object, + #name : 'MicPictureBasedWriter', + #superclass : 'Object', #instVars : [ 'placeOfTemplateFolder', 'sourceSlideImagesFolder', 'slideNames', 'sourcePDF' ], - #category : #'Microdown-H5P' + #category : 'Microdown-H5P', + #package : 'Microdown-H5P' } -{ #category : #examples } +{ #category : 'examples' } MicPictureBasedWriter class >> example [ @@ -398,14 +400,14 @@ MicHTMLVisitor >> visitMath: anObject [ ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> visitMetaData: aMetaData [ self metaDataFromAssociations: aMetaData body. super visitMetaData: aMetaData. ] -{ #category : #'visiting - inline elements' } +{ #category : 'visiting - inline elements' } MicHTMLVisitor >> visitMonospace: aMonospace [ canvas tag @@ -413,7 +415,7 @@ MicHTMLVisitor >> visitMonospace: aMonospace [ with: [ super visitMonospace: aMonospace ] ] -{ #category : #'visiting - list' } +{ #category : 'visiting - list' } MicHTMLVisitor >> visitOrderedList: anOrderedList [ canvas newLine. @@ -424,7 +426,7 @@ MicHTMLVisitor >> visitOrderedList: anOrderedList [ super visitOrderedList: anOrderedList ] ] -{ #category : #'visiting - list' } +{ #category : 'visiting - list' } MicHTMLVisitor >> visitOrderedListItem: anOrderedListItem [ "will not work with we have text decorators such as bold, italic, monospace" @@ -435,7 +437,7 @@ MicHTMLVisitor >> visitOrderedListItem: anOrderedListItem [ ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> visitParagraph: aParagraph [ canvas newLine. @@ -444,7 +446,7 @@ MicHTMLVisitor >> visitParagraph: aParagraph [ with: [ super visitParagraph: aParagraph ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> visitQuote: aQuote [ "If the quote text size exceeds a minimum threshold, use blockquote which is appropriate for long quotations" @@ -457,7 +459,7 @@ MicHTMLVisitor >> visitQuote: aQuote [ with: [ super visitQuote: aQuote ] ] -{ #category : #'visiting - inline elements' } +{ #category : 'visiting - inline elements' } MicHTMLVisitor >> visitStrike: aStrike [ canvas tag @@ -465,7 +467,7 @@ MicHTMLVisitor >> visitStrike: aStrike [ with: [ super visitStrike: aStrike ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> visitTable: aTable [ canvas newLine. @@ -476,20 +478,20 @@ MicHTMLVisitor >> visitTable: aTable [ self visitTableRows: aTable ] ] -{ #category : #writing } +{ #category : 'writing' } MicHTMLVisitor >> visitTableHeaders: header [ self visitTableRow: header withTag: 'th'. ] -{ #category : #writing } +{ #category : 'writing' } MicHTMLVisitor >> visitTableRow: row [ self visitTableRow: row withTag: 'td' ] -{ #category : #writing } +{ #category : 'writing' } MicHTMLVisitor >> visitTableRow: row withTag: aString [ "Private - Generalized visiting row to handle both table header and table row (td)" @@ -503,7 +505,7 @@ MicHTMLVisitor >> visitTableRow: row withTag: aString [ canvas newLine ] -{ #category : #writing } +{ #category : 'writing' } MicHTMLVisitor >> visitTableRows: aTable [ | remainingRows | @@ -517,7 +519,7 @@ MicHTMLVisitor >> visitTableRows: aTable [ remainingRows do: [ : row | self visitTableRow: row ] ] -{ #category : #'visiting - inline elements' } +{ #category : 'visiting - inline elements' } MicHTMLVisitor >> visitText: aText [ canvas nextPutAll: ( @@ -526,7 +528,7 @@ MicHTMLVisitor >> visitText: aText [ ] -{ #category : #'visiting - list' } +{ #category : 'visiting - list' } MicHTMLVisitor >> visitUnorderedList: anUnorderedList [ canvas newLine. @@ -537,7 +539,7 @@ MicHTMLVisitor >> visitUnorderedList: anUnorderedList [ super visitUnorderedList: anUnorderedList ] ] -{ #category : #'visiting - list' } +{ #category : 'visiting - list' } MicHTMLVisitor >> visitUnorderedListItem: anUnorderedListItem [ "will not work with we have text decorators such as bold, italic, monospace" @@ -548,7 +550,7 @@ MicHTMLVisitor >> visitUnorderedListItem: anUnorderedListItem [ ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> writeCounter: aCounter [ "Write on the canvas the string representation of ==aCounter==" @@ -558,25 +560,25 @@ MicHTMLVisitor >> writeCounter: aCounter [ separatedBy: [ self writeCounterElementSeparator ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> writeCounterDefinitionSeparator [ canvas nextPutAll: '. ' ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> writeCounterElement: aCounterElement [ canvas nextPutAll: aCounterElement asString ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> writeCounterElementSeparator [ self shouldBeImplemented ] -{ #category : #visiting } +{ #category : 'visiting' } MicHTMLVisitor >> writeCounterForScript: aScript [ aScript counter isValidCounter ifFalse: [ ^ self ]. diff --git a/src/Microdown-HTMLExporter/MicLinkBlock.extension.st b/src/Microdown-HTMLExporter/MicLinkBlock.extension.st index 4c7ff8ae..d8036b67 100644 --- a/src/Microdown-HTMLExporter/MicLinkBlock.extension.st +++ b/src/Microdown-HTMLExporter/MicLinkBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicLinkBlock } +Extension { #name : 'MicLinkBlock' } -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } MicLinkBlock >> referencePath [ ^ self reference fullName diff --git a/src/Microdown-HTMLExporter/MicListBlock.extension.st b/src/Microdown-HTMLExporter/MicListBlock.extension.st index c18fec09..317cdce5 100644 --- a/src/Microdown-HTMLExporter/MicListBlock.extension.st +++ b/src/Microdown-HTMLExporter/MicListBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicListBlock } +Extension { #name : 'MicListBlock' } -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } MicListBlock >> listItemText [ "I just need the first children which contains the text, currently #text concatenates all children's text" diff --git a/src/Microdown-HTMLExporter/MicListItemBlock.extension.st b/src/Microdown-HTMLExporter/MicListItemBlock.extension.st index f358dce3..2d3461e0 100644 --- a/src/Microdown-HTMLExporter/MicListItemBlock.extension.st +++ b/src/Microdown-HTMLExporter/MicListItemBlock.extension.st @@ -1,13 +1,13 @@ -Extension { #name : #MicListItemBlock } +Extension { #name : 'MicListItemBlock' } -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } MicListItemBlock >> hasChildren [ "Answer if the receiver has any children" ^ self children size > 1 ] -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } MicListItemBlock >> hasNestedChildren [ "Answer if the receiver's children are list items and they are nested" @@ -15,7 +15,7 @@ MicListItemBlock >> hasNestedChildren [ self children second nestedLevel > self nestedLevel ] ] -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } MicListItemBlock >> listItemText [ ^ text diff --git a/src/Microdown-HTMLExporter/MicRelativeResourceReference.extension.st b/src/Microdown-HTMLExporter/MicRelativeResourceReference.extension.st index cbab0c8b..f041ffd1 100644 --- a/src/Microdown-HTMLExporter/MicRelativeResourceReference.extension.st +++ b/src/Microdown-HTMLExporter/MicRelativeResourceReference.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicRelativeResourceReference } +Extension { #name : 'MicRelativeResourceReference' } -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } MicRelativeResourceReference >> uri [ "Answer the receiver's reference in a uri (ZnUrl)." diff --git a/src/Microdown-HTMLExporter/Microdown.extension.st b/src/Microdown-HTMLExporter/Microdown.extension.st index 94ee6521..61b11af1 100644 --- a/src/Microdown-HTMLExporter/Microdown.extension.st +++ b/src/Microdown-HTMLExporter/Microdown.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Microdown } +Extension { #name : 'Microdown' } -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } Microdown class >> asHTMLDocument: aStringOrDoc [ "Facade method to serialize a Microdown document or string to HTML" @@ -9,7 +9,7 @@ Microdown class >> asHTMLDocument: aStringOrDoc [ ] -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } Microdown class >> asHTMLString: aStringOrDoc [ "Facade method to render a microdown document or string to HTML" @@ -18,7 +18,7 @@ Microdown class >> asHTMLString: aStringOrDoc [ ] -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } Microdown class >> asHTMLString: aStringOrDoc configuration: aMicHTMLConfiguration [ "Facade method to render a microdown document or string to HTML" diff --git a/src/Microdown-HTMLExporter/ZnClient.extension.st b/src/Microdown-HTMLExporter/ZnClient.extension.st index b6426fa9..41bf5e5e 100644 --- a/src/Microdown-HTMLExporter/ZnClient.extension.st +++ b/src/Microdown-HTMLExporter/ZnClient.extension.st @@ -1,19 +1,19 @@ -Extension { #name : #ZnClient } +Extension { #name : 'ZnClient' } -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } ZnClient >> requestSegments [ "Answer a with the receiver's parts (those separated by /)" ^ self requestUri segments ] -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } ZnClient >> requestUri [ ^ self request uri ] -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } ZnClient >> requestedResource [ "Answer a with the name of resource (file or directory) requested" diff --git a/src/Microdown-HTMLExporter/ZnUrl.extension.st b/src/Microdown-HTMLExporter/ZnUrl.extension.st index 86ebcf44..59be2b44 100644 --- a/src/Microdown-HTMLExporter/ZnUrl.extension.st +++ b/src/Microdown-HTMLExporter/ZnUrl.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #ZnUrl } +Extension { #name : 'ZnUrl' } -{ #category : #'*Microdown-HTMLExporter' } +{ #category : '*Microdown-HTMLExporter' } ZnUrl >> filename [ ^ self pathSegments last diff --git a/src/Microdown-HTMLExporter/package.st b/src/Microdown-HTMLExporter/package.st index cb23ee6c..3e0bf061 100644 --- a/src/Microdown-HTMLExporter/package.st +++ b/src/Microdown-HTMLExporter/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-HTMLExporter' } +Package { #name : 'Microdown-HTMLExporter' } diff --git a/src/Microdown-LaTeXExporter-Tests/ManifestMicrodownLaTeXExporterTests.class.st b/src/Microdown-LaTeXExporter-Tests/ManifestMicrodownLaTeXExporterTests.class.st index c0016f30..1ad16d06 100644 --- a/src/Microdown-LaTeXExporter-Tests/ManifestMicrodownLaTeXExporterTests.class.st +++ b/src/Microdown-LaTeXExporter-Tests/ManifestMicrodownLaTeXExporterTests.class.st @@ -4,7 +4,9 @@ stream nextPutAll: 'Hello world' ``` " Class { - #name : #ManifestMicrodownLaTeXExporterTests, - #superclass : #PackageManifest, - #category : #'Microdown-LaTeXExporter-Tests-Manifest' + #name : 'ManifestMicrodownLaTeXExporterTests', + #superclass : 'PackageManifest', + #category : 'Microdown-LaTeXExporter-Tests-Manifest', + #package : 'Microdown-LaTeXExporter-Tests', + #tag : 'Manifest' } diff --git a/src/Microdown-LaTeXExporter-Tests/MicExportCanvasTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicExportCanvasTest.class.st index 9d746ffa..72433e6f 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicExportCanvasTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicExportCanvasTest.class.st @@ -1,13 +1,14 @@ Class { - #name : #MicExportCanvasTest, - #superclass : #TestCase, + #name : 'MicExportCanvasTest', + #superclass : 'TestCase', #instVars : [ 'canvas' ], - #category : #'Microdown-LaTeXExporter-Tests' + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #running } +{ #category : 'running' } MicExportCanvasTest >> setUp [ | stream | super setUp. @@ -15,28 +16,28 @@ MicExportCanvasTest >> setUp [ canvas := MicExportCanvas on: stream. ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testCrAsNewLine [ canvas crAsNewLine. self assert: canvas stream configuration newLine equals: Character cr ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testCrlfAsNewLine [ canvas crlfAsNewLine. self assert: canvas stream configuration newLine equals: String crlf ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testLfAsNewLine [ canvas lfAsNewLine. self assert: canvas stream configuration newLine equals: Character lf ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCr [ canvas crAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -47,7 +48,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrButNewLineIsCrlf [ canvas crlfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -58,7 +59,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrButNewLineIsLf [ canvas lfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -69,7 +70,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrlf [ canvas crlfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -80,7 +81,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrlfButNewLineIsCr [ canvas crAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -91,7 +92,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithCrlfButNewLineIsLf [ canvas lfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -102,7 +103,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithLf [ canvas lfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -113,7 +114,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithLfButNewLineIsCr [ canvas crAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -124,7 +125,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicExportCanvasTest >> testWriteAParagraphWithLfButNewLineIsCrlf [ canvas crlfAsNewLine. canvas nextPutAllLines: 'Je ne vois pas pourquoi diff --git a/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st index 21775040..f7d76d2b 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicLaTeXWriterTest.class.st @@ -1,21 +1,22 @@ Class { - #name : #MicLaTeXWriterTest, - #superclass : #ParametrizedTestCase, + #name : 'MicLaTeXWriterTest', + #superclass : 'ParametrizedTestCase', #instVars : [ 'parser', 'writer', 'factory', 'newLine' ], - #category : #'Microdown-LaTeXExporter-Tests' + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #asserting } +{ #category : 'asserting' } MicLaTeXWriterTest class >> shouldInheritSelectors [ ^ true ] -{ #category : #asserting } +{ #category : 'asserting' } MicLaTeXWriterTest class >> testParameters [ ^ ParametrizedTestMatrix new @@ -26,13 +27,13 @@ MicLaTeXWriterTest class >> testParameters [ yourself ] -{ #category : #running } +{ #category : 'running' } MicLaTeXWriterTest >> actualClass [ ^ MicLaTeXWriter ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriterTest >> assert: result includesSubstring: expected [ expected ifEmpty: [ ^ self ]. @@ -41,7 +42,7 @@ MicLaTeXWriterTest >> assert: result includesSubstring: expected [ description: ('''{1}'' not in ''{2}''' format: {expected . result}) ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriterTest >> assertWriting: aDocumentItem includesText: aString [ | result | self writeForElement: aDocumentItem. @@ -49,7 +50,7 @@ MicLaTeXWriterTest >> assertWriting: aDocumentItem includesText: aString [ self assert: result includesSubstring: aString ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriterTest >> assertWriting: aDocumentItem includesTexts: aCollection [ | resultString | self writeForElement: aDocumentItem. @@ -57,12 +58,12 @@ MicLaTeXWriterTest >> assertWriting: aDocumentItem includesTexts: aCollection [ aCollection do: [ :testString | self assert: resultString includesSubstring: testString ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriterTest >> factory: aFactory [ factory := aFactory new ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriterTest >> newLine: aNewLine [ (aNewLine = String cr) ifTrue:[ writer crAsNewLine ]. (aNewLine = String lf) ifTrue:[ writer lfAsNewLine ]. @@ -70,7 +71,7 @@ MicLaTeXWriterTest >> newLine: aNewLine [ newLine := aNewLine ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> parse: aString andCheckWeGet: aResultingString [ | mic | @@ -79,7 +80,7 @@ MicLaTeXWriterTest >> parse: aString andCheckWeGet: aResultingString [ self assert: writer contents equals: aResultingString ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> parseInlined: aString andCheckWeGet: aResultingString [ | mic | @@ -88,19 +89,19 @@ MicLaTeXWriterTest >> parseInlined: aString andCheckWeGet: aResultingString [ self assert: writer contents equals: newLine , aResultingString, newLine ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriterTest >> parser: aParser [ parser := aParser new ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testAnchor [ self parse: factory anchorSample andCheckWeGet: '\label{test}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testAnchorReference [ "Pay attention that an anchor reference only exists within a paragraph and as such a paragraph emit a newline to start." @@ -108,19 +109,19 @@ MicLaTeXWriterTest >> testAnchorReference [ ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> testBold [ self parseInlined: factory boldFormatSample andCheckWeGet: '\textbf{Foo}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testCitation [ self parseInlined: '{!citation|ref=Duca99a!}' andCheckWeGet: '\cite{Duca99a}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblock [ self writeFor: (factory codeblockNoParamBody: 'this is a code'). @@ -129,7 +130,7 @@ MicLaTeXWriterTest >> testCodeblock [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblockWithCaption [ self writeFor: (factory codeblock: 'caption=Pharo is **cool**' body: 'this is a code'). @@ -138,7 +139,7 @@ MicLaTeXWriterTest >> testCodeblockWithCaption [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testCodeblockWithLabel [ self writeFor: (factory codeblock: 'label=Pharo' body: 'this is a code'). @@ -147,21 +148,21 @@ MicLaTeXWriterTest >> testCodeblockWithLabel [ '\end{listing}', newLine ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testCrAsNewLine [ writer crAsNewLine. self assert: writer canvas stream configuration newLine equals: Character cr ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testCrlfAsNewLine [ writer crlfAsNewLine. self assert: writer canvas stream configuration newLine equals: String crlf ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testFigure [ self writeFor: factory figureSample. @@ -174,7 +175,7 @@ MicLaTeXWriterTest >> testFigure [ '\end{figure}', newLine, newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testFigureBold [ self writeFor: factory figureBoldSample. self assert: writer contents equals: newLine, @@ -186,7 +187,7 @@ MicLaTeXWriterTest >> testFigureBold [ '\end{figure}', newLine , newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testFigureRealSample [ self writeFor: factory figureRealSample. @@ -203,77 +204,77 @@ self flag: #todo. ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testFootnote [ self parseInlined: factory footnoteSample andCheckWeGet: '\footnote{Pharo is cool}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel1 [ self parse: factory headerLevel1Sample andCheckWeGet: newLine , '\part{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel2 [ self parse: factory headerLevel2Sample andCheckWeGet: newLine , '\chapter{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel3 [ self parse: factory headerLevel3Sample andCheckWeGet: newLine , '\section{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel4 [ self parse: factory headerLevel4Sample andCheckWeGet: newLine , '\subsection{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel5 [ self parse: factory headerLevel5Sample andCheckWeGet: newLine , '\subsubsection{Foo}' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicLaTeXWriterTest >> testHeaderLevel6 [ self parse: factory headerLevel6Sample andCheckWeGet: newLine , '\paragraph{Foo}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testHorizontalLine [ self parseInlined: factory horizontalLineSample andCheckWeGet: '\rule{\textwidth}{0.1pt}' ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> testItalic [ self parseInlined: factory italicFormatSample andCheckWeGet: '\textit{Foo}' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testLfAsNewLine [ writer lfAsNewLine. self assert: writer canvas stream configuration newLine equals: Character lf ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testLink [ self writeFor: factory linkSample. self assert: writer contents equals: newLine, '\href{/anUrl}{Foo}\footnotesize{\url{/anUrl}}', newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testLinkBold [ self flag: 'caption do not use bold in the caption'. @@ -284,13 +285,13 @@ MicLaTeXWriterTest >> testLinkBold [ '\href{/anUrl}{**Foo**}\footnotesize{\url{/anUrl}}', newLine ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> testMonospace [ self parseInlined: factory monospaceFormatSample andCheckWeGet: '\code{Foo}' ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedList [ self writeFor: factory orderedListWithTwoItemsSample. @@ -301,7 +302,7 @@ MicLaTeXWriterTest >> testOrderedList [ '\end{enumerate}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedListBold [ self writeFor: factory orderedListWithTwoItemsBoldSample. @@ -312,7 +313,7 @@ MicLaTeXWriterTest >> testOrderedListBold [ '\end{enumerate}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedListNested [ self writeFor: factory orderedListWithTwoItemsBoldFirstSample. @@ -323,7 +324,7 @@ MicLaTeXWriterTest >> testOrderedListNested [ '\end{enumerate}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedNestedListNested [ self writeFor: factory nestedOrderedListSample. @@ -339,7 +340,7 @@ MicLaTeXWriterTest >> testOrderedNestedListNested [ '\end{itemize}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testOrderedNestedListNested2 [ self writeFor: factory nestedOrderedList2Sample. @@ -360,7 +361,7 @@ MicLaTeXWriterTest >> testOrderedNestedListNested2 [ '\end{itemize}', newLine ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraph [ self parse: factory paragraphSample andCheckWeGet: newLine, @@ -368,28 +369,28 @@ MicLaTeXWriterTest >> testParagraph [ ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphLongWithAccents [ self parse: factory paragraphOnMultipleLinesSample andCheckWeGet: newLine, 'Je ne connais pas la peur, car la peur tue l''esprit. La peur est la petite mort qui conduit \`{a} l''oblit\''{e}ration totale. J''affonterai ma peur. Je lui permettrais de passer sur moi, au travers de moi. Et lorsqu''elle sera pass\''{e}e, je tournerai mon oeil interieur sur son chemin. Et l\`{a} o\`{u} elle sera pass\''{e}e, il n''y aura plus rien, rien que moi.', newLine ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphWithBold [ self parse: factory paragraphBoldSample andCheckWeGet: newLine , 'this is a \textbf{paragraph}', newLine ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphWithItalic [ self parse: factory paragraphItalicSample andCheckWeGet: newLine , 'this is a \textit{paragraph}', newLine ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphWithMonospace [ self parse: factory paragraphMonospaceSample andCheckWeGet: newLine , @@ -397,14 +398,14 @@ MicLaTeXWriterTest >> testParagraphWithMonospace [ ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicLaTeXWriterTest >> testParagraphWithNested [ self parse: factory paragraphNestedSample andCheckWeGet: newLine , 'this is a \textbf{\textit{paragraph}}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testQuote [ self parse: factory quoteSample andCheckWeGet: '\begin{verbatim}', newLine , @@ -412,21 +413,21 @@ MicLaTeXWriterTest >> testQuote [ '\end{verbatim}', newLine ] -{ #category : #'tests - figure/link' } +{ #category : 'tests - figure/link' } MicLaTeXWriterTest >> testRealLinkSample [ self writeFor: factory realLinkSample. self assert: writer contents equals: newLine , '\href{http://www.pharo.org}{The Pharo Project}\footnotesize{\url{http://www.pharo.org}}', newLine ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicLaTeXWriterTest >> testStrike [ self parseInlined: factory strikethroughFormatSample andCheckWeGet: '\sout{Foo}' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testTable [ self writeFor: factory tableSample. self assert: writer contents equals: newLine, @@ -439,7 +440,7 @@ MicLaTeXWriterTest >> testTable [ '\end{tabular}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testTableWhithoutHeader [ self writeFor: (factory simpleTableWithoutHeaderTable). @@ -452,7 +453,7 @@ MicLaTeXWriterTest >> testTableWhithoutHeader [ '\end{tabular}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testUnorderedList [ self writeFor: factory unorderedListWithTwoItemsSample. @@ -463,7 +464,7 @@ MicLaTeXWriterTest >> testUnorderedList [ '\end{itemize}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testUnorderedListBold [ self writeFor: factory unorderedListWithTwoItemsBoldSample. @@ -474,7 +475,7 @@ MicLaTeXWriterTest >> testUnorderedListBold [ '\end{itemize}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testUnorderedListNested [ self writeFor: factory unorderedListWithTwoItemsNestedSample. @@ -485,7 +486,7 @@ MicLaTeXWriterTest >> testUnorderedListNested [ '\end{itemize}', newLine ] -{ #category : #'tests - lists' } +{ #category : 'tests - lists' } MicLaTeXWriterTest >> testUnorderedNestedListNested [ self writeFor: factory nestedUnorderedListSample. @@ -502,7 +503,7 @@ MicLaTeXWriterTest >> testUnorderedNestedListNested [ ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> testUrlsAreProtected [ self assert: (writer protectUrl: '#') equals: '\#'. @@ -513,7 +514,7 @@ MicLaTeXWriterTest >> testUrlsAreProtected [ self assert: (writer protectUrl: '\~#%') equals: '\\~\#\%'. ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCr [ writer crAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -524,7 +525,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrButNewLineIsCrlf [ writer crlfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -535,7 +536,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrButNewLineIsLf [ writer lfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -546,7 +547,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrlf [ writer crlfAsNewLine . writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -557,7 +558,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrlfButNewLineIsCr [ writer crAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -568,7 +569,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithCrlfButNewLineIsLf [ writer lfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -579,7 +580,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithLf [ writer lfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -590,7 +591,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithLfButNewLineIsCr [ writer crAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -601,7 +602,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #'tests - breaklining' } +{ #category : 'tests - breaklining' } MicLaTeXWriterTest >> testWriteAParagraphWithLfButNewLineIsCrlf [ writer crlfAsNewLine. writer canvas nextPutAllLines: 'Je ne vois pas pourquoi @@ -612,7 +613,7 @@ car il a etait fait pour cela'. 'car il a etait fait pour cela' ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> writeFor: aString [ | mic | mic := parser parse: aString. @@ -620,14 +621,14 @@ MicLaTeXWriterTest >> writeFor: aString [ ] -{ #category : #tests } +{ #category : 'tests' } MicLaTeXWriterTest >> writeForElement: aNode [ writer visit: aNode. ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriterTest >> writer: aWriter [ writer := aWriter new ] diff --git a/src/Microdown-LaTeXExporter-Tests/MicMinimalConfigurationTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicMinimalConfigurationTest.class.st index 36fc68e4..2bcb8df6 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicMinimalConfigurationTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicMinimalConfigurationTest.class.st @@ -1,34 +1,35 @@ Class { - #name : #MicMinimalConfigurationTest, - #superclass : #TestCase, + #name : 'MicMinimalConfigurationTest', + #superclass : 'TestCase', #instVars : [ 'config' ], - #category : #'Microdown-LaTeXExporter-Tests' + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #running } +{ #category : 'running' } MicMinimalConfigurationTest >> setUp [ super setUp. config := MicMinimalConfiguration new. ] -{ #category : #tests } +{ #category : 'tests' } MicMinimalConfigurationTest >> testCrAsNewLine [ config crAsNewLine. self assert: config newLine equals: Character cr ] -{ #category : #tests } +{ #category : 'tests' } MicMinimalConfigurationTest >> testCrlfAsNewLine [ config crlfAsNewLine. self assert: config newLine equals: String crlf ] -{ #category : #tests } +{ #category : 'tests' } MicMinimalConfigurationTest >> testLfAsNewLine [ config lfAsNewLine. diff --git a/src/Microdown-LaTeXExporter-Tests/MicOutputStreamTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicOutputStreamTest.class.st index effa15eb..262cc174 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicOutputStreamTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicOutputStreamTest.class.st @@ -1,34 +1,35 @@ Class { - #name : #MicOutputStreamTest, - #superclass : #TestCase, + #name : 'MicOutputStreamTest', + #superclass : 'TestCase', #instVars : [ 'stream' ], - #category : #'Microdown-LaTeXExporter-Tests' + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #running } +{ #category : 'running' } MicOutputStreamTest >> setUp [ super setUp. stream := MicOutputStream new. ] -{ #category : #tests } +{ #category : 'tests' } MicOutputStreamTest >> testCrAsNewLine [ stream crAsNewLine. self assert: stream configuration newLine equals: Character cr ] -{ #category : #tests } +{ #category : 'tests' } MicOutputStreamTest >> testCrlfAsNewLine [ stream crlfAsNewLine. self assert: stream configuration newLine equals: String crlf ] -{ #category : #tests } +{ #category : 'tests' } MicOutputStreamTest >> testLfAsNewLine [ stream lfAsNewLine. diff --git a/src/Microdown-LaTeXExporter-Tests/MicSBALaTeXWriterTest.class.st b/src/Microdown-LaTeXExporter-Tests/MicSBALaTeXWriterTest.class.st index 63471fbb..7390a926 100644 --- a/src/Microdown-LaTeXExporter-Tests/MicSBALaTeXWriterTest.class.st +++ b/src/Microdown-LaTeXExporter-Tests/MicSBALaTeXWriterTest.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicSBALaTeXWriterTest, - #superclass : #MicLaTeXWriterTest, - #category : #'Microdown-LaTeXExporter-Tests' + #name : 'MicSBALaTeXWriterTest', + #superclass : 'MicLaTeXWriterTest', + #category : 'Microdown-LaTeXExporter-Tests', + #package : 'Microdown-LaTeXExporter-Tests' } -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest class >> testParameters [ ^ ParametrizedTestMatrix new @@ -15,12 +16,12 @@ MicSBALaTeXWriterTest class >> testParameters [ yourself ] -{ #category : #private } +{ #category : 'private' } MicSBALaTeXWriterTest >> actualClass [ ^ MicSBALaTeXWriter ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testCodeblock [ self writeFor: (factory codeblockNoParamBody: 'this is a code'). @@ -29,7 +30,7 @@ MicSBALaTeXWriterTest >> testCodeblock [ '\end{displaycode}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testCodeblockWithCaption [ self writeFor: (factory codeblock: 'caption=Pharo is **cool**' body: 'this is a code'). @@ -38,7 +39,7 @@ MicSBALaTeXWriterTest >> testCodeblockWithCaption [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testCodeblockWithChevron [ self writeFor: @@ -54,7 +55,7 @@ MicSBALaTeXWriterTest >> testCodeblockWithChevron [ , newLine , '\end{listing}' , newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testCodeblockWithLabel [ self writeFor: (factory codeblock: 'label=Pharo' body: 'this is a code'). @@ -63,7 +64,7 @@ MicSBALaTeXWriterTest >> testCodeblockWithLabel [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testFloatingWithBothLabelAndCaption [ | codeBlock | codeBlock := (MicCodeBlock new body: 'foo') @@ -73,7 +74,7 @@ MicSBALaTeXWriterTest >> testFloatingWithBothLabelAndCaption [ self assertWriting: codeBlock includesTexts: #('label=myScript') ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testInFlowOnTwoLines [ | codeBlock | codeBlock := MicCodeBlock new body: 'foo', newLine , 'bar on another line'. @@ -84,13 +85,13 @@ MicSBALaTeXWriterTest >> testInFlowOnTwoLines [ '\end{displaycode}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testMonospace [ self parseInlined: factory monospaceFormatSample andCheckWeGet: '\textcode{Foo}' ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testParagraphWithChevron [ self writeFor: (factory textWithChevron). @@ -98,14 +99,14 @@ MicSBALaTeXWriterTest >> testParagraphWithChevron [ 'Pilou \textgreater{}\textgreater{} bla', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testParagraphWithMonospace [ self parse: factory paragraphMonospaceSample andCheckWeGet: newLine, 'this is a \textcode{paragraph}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testSimpleFloating [ | codeBlock | codeBlock := (MicCodeBlock new body: 'foo') @@ -117,7 +118,7 @@ MicSBALaTeXWriterTest >> testSimpleFloating [ '\end{listing}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testSimpleFloatingNoLanguage [ | codeBlock | codeBlock := (MicCodeBlock new body: 'foo') @@ -128,7 +129,7 @@ MicSBALaTeXWriterTest >> testSimpleFloatingNoLanguage [ self assertWriting: codeBlock includesText: '{smalltalk}' ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testTable [ self writeFor: factory tableSample. self assert: writer contents equals: newLine, @@ -141,7 +142,7 @@ MicSBALaTeXWriterTest >> testTable [ '\end{fullwidthtabular}', newLine ] -{ #category : #tests } +{ #category : 'tests' } MicSBALaTeXWriterTest >> testTableWhithoutHeader [ self writeFor: (factory simpleTableWithoutHeaderTable). diff --git a/src/Microdown-LaTeXExporter-Tests/package.st b/src/Microdown-LaTeXExporter-Tests/package.st index 41cf89c9..07953723 100644 --- a/src/Microdown-LaTeXExporter-Tests/package.st +++ b/src/Microdown-LaTeXExporter-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-LaTeXExporter-Tests' } +Package { #name : 'Microdown-LaTeXExporter-Tests' } diff --git a/src/Microdown-LaTeXExporter/MicDocumentWriter.class.st b/src/Microdown-LaTeXExporter/MicDocumentWriter.class.st index b9693df1..e81d7d80 100644 --- a/src/Microdown-LaTeXExporter/MicDocumentWriter.class.st +++ b/src/Microdown-LaTeXExporter/MicDocumentWriter.class.st @@ -3,41 +3,42 @@ I'm the superclass of writers in various formats. I managed end of line conventions, canvas responsible for the encodings of specific commands to output a given format and I support raw ouputting. " Class { - #name : #MicDocumentWriter, - #superclass : #MicrodownVisitor, + #name : 'MicDocumentWriter', + #superclass : 'MicrodownVisitor', #instVars : [ 'canvas', 'nbListTab', 'writingRaw' ], - #category : #'Microdown-LaTeXExporter' + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #accessing } +{ #category : 'accessing' } MicDocumentWriter >> canvasClass [ ^ self subclassResponsibility ] -{ #category : #writing } +{ #category : 'writing' } MicDocumentWriter >> contents [ ^ canvas contents ] -{ #category : #initialization } +{ #category : 'initialization' } MicDocumentWriter >> crAsNewLine [ canvas crAsNewLine ] -{ #category : #initialization } +{ #category : 'initialization' } MicDocumentWriter >> crlfAsNewLine [ canvas crlfAsNewLine ] -{ #category : #initialization } +{ #category : 'initialization' } MicDocumentWriter >> initialize [ | stream | super initialize. @@ -47,34 +48,34 @@ MicDocumentWriter >> initialize [ nbListTab := -1 ] -{ #category : #initialization } +{ #category : 'initialization' } MicDocumentWriter >> lfAsNewLine [ canvas lfAsNewLine ] -{ #category : #initialization } +{ #category : 'initialization' } MicDocumentWriter >> usedNewLine [ "Return the encoded new line. Useful for tests." ^ canvas stream usedNewLine ] -{ #category : #writing } +{ #category : 'writing' } MicDocumentWriter >> visit: aMicElement [ aMicElement accept: self. ^ self contents ] -{ #category : #writing } +{ #category : 'writing' } MicDocumentWriter >> write: aMicElement [ "for now for integration with Pillar." self visit: aMicElement. ^ self contents ] -{ #category : #writing } +{ #category : 'writing' } MicDocumentWriter >> writeRawDuring: aBlock [ [ diff --git a/src/Microdown-LaTeXExporter/MicExportBrush.class.st b/src/Microdown-LaTeXExporter/MicExportBrush.class.st index c3bc7651..3b473ee3 100644 --- a/src/Microdown-LaTeXExporter/MicExportBrush.class.st +++ b/src/Microdown-LaTeXExporter/MicExportBrush.class.st @@ -4,15 +4,16 @@ I'm the superclass of all brushes. A brush is something you can add on a canvas. Copied from Pillar " Class { - #name : #MicExportBrush, - #superclass : #Object, + #name : 'MicExportBrush', + #superclass : 'Object', #instVars : [ 'stream' ], - #category : #'Microdown-LaTeXExporter' + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #initialization } +{ #category : 'initialization' } MicExportBrush >> setStream: aStream [ stream := aStream ] diff --git a/src/Microdown-LaTeXExporter/MicExportCanvas.class.st b/src/Microdown-LaTeXExporter/MicExportCanvas.class.st index 6025acba..8a563f2c 100644 --- a/src/Microdown-LaTeXExporter/MicExportCanvas.class.st +++ b/src/Microdown-LaTeXExporter/MicExportCanvas.class.st @@ -4,24 +4,25 @@ I am the place where the visitors will write stuff. I output everything to a str Copied from Pillar " Class { - #name : #MicExportCanvas, - #superclass : #Object, + #name : 'MicExportCanvas', + #superclass : 'Object', #instVars : [ 'stream', 'currentBrush', 'writingRaw' ], - #category : #'Microdown-LaTeXExporter' + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicExportCanvas class >> on: aStream [ ^ self new setStream: aStream; yourself ] -{ #category : #private } +{ #category : 'private' } MicExportCanvas >> brush: aBrush [ self flush. currentBrush := aBrush. @@ -29,49 +30,49 @@ MicExportCanvas >> brush: aBrush [ ^ aBrush ] -{ #category : #accessing } +{ #category : 'accessing' } MicExportCanvas >> contents [ ^ stream contents ] -{ #category : #accessing } +{ #category : 'accessing' } MicExportCanvas >> crAsNewLine [ stream crAsNewLine ] -{ #category : #accessing } +{ #category : 'accessing' } MicExportCanvas >> crlfAsNewLine [ stream crlfAsNewLine ] -{ #category : #accessing } +{ #category : 'accessing' } MicExportCanvas >> flush [ stream flush ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> initialize [ super initialize. writingRaw := false ] -{ #category : #accessing } +{ #category : 'accessing' } MicExportCanvas >> lfAsNewLine [ stream lfAsNewLine ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> line: aString [ self nextPutAll: aString; newLine ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> lines: aString [ "Output aString and take care of line ending within aString." | str | @@ -84,55 +85,55 @@ MicExportCanvas >> lines: aString [ ] ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> newLine [ stream newLine ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> nextPut: aCharacter [ stream nextPut: aCharacter ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> nextPutAll: aString [ aString do: [ :char | self nextPut: char ] ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> nextPutAllLines: aString [ self withLinesIn: aString do: [ :line | self nextPutAll: line ] separatedBy: [ self newLine ] ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> raw: aString [ stream << aString ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> rawLines: aString [ "Output aString and take care of line ending within aString." self withLinesIn: aString do: [ :line | self raw: line ] separatedBy: [ self newLine ] ] -{ #category : #initialization } +{ #category : 'initialization' } MicExportCanvas >> setStream: aStream [ stream := aStream ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> space [ stream space ] -{ #category : #accessing } +{ #category : 'accessing' } MicExportCanvas >> stream [ "Pay attention to what you do with this stream. You may break the canvas logic" ^ stream ] -{ #category : #private } +{ #category : 'private' } MicExportCanvas >> withLinesIn: aString do: aBlock separatedBy: anotherBlock [ "this method shows that the body of code block is weak because it should encapsulate the way it internally represents lines. Now this is exposed in clients." | str | @@ -146,7 +147,7 @@ MicExportCanvas >> withLinesIn: aString do: aBlock separatedBy: anotherBlock [ ifFalse: anotherBlock ] ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicExportCanvas >> writingRaw: aBoolean [ writingRaw := aBoolean diff --git a/src/Microdown-LaTeXExporter/MicLaTeXBrush.class.st b/src/Microdown-LaTeXExporter/MicLaTeXBrush.class.st index 2ac28437..e405fdcb 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXBrush.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXBrush.class.st @@ -2,12 +2,13 @@ Command and environment LaTeX brushes common superclass. " Class { - #name : #MicLaTeXBrush, - #superclass : #MicExportBrush, - #category : #'Microdown-LaTeXExporter' + #name : 'MicLaTeXBrush', + #superclass : 'MicExportBrush', + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXBrush >> optParameter: aStringOrBlock [ stream << $[ @@ -15,7 +16,7 @@ MicLaTeXBrush >> optParameter: aStringOrBlock [ << $] ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXBrush >> parameter: aStringOrBlock [ stream << ${ diff --git a/src/Microdown-LaTeXExporter/MicLaTeXCanvas.class.st b/src/Microdown-LaTeXExporter/MicLaTeXCanvas.class.st index d1790cc6..6040c6a1 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXCanvas.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXCanvas.class.st @@ -2,15 +2,16 @@ I'm a specialized canvas to emit commands and latex environments. " Class { - #name : #MicLaTeXCanvas, - #superclass : #MicExportCanvas, + #name : 'MicLaTeXCanvas', + #superclass : 'MicExportCanvas', #classVars : [ 'LatexCharacters' ], - #category : #'Microdown-LaTeXExporter' + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #'class initialization' } +{ #category : 'class initialization' } MicLaTeXCanvas class >> initialize [ " self initialize " LatexCharacters := Dictionary new. @@ -86,17 +87,17 @@ MicLaTeXCanvas class >> initialize [ at: $Ñ put: '\~{N}' ] -{ #category : #tags } +{ #category : 'tags' } MicLaTeXCanvas >> command [ ^ self brush: MicLaTeXCommand new ] -{ #category : #tags } +{ #category : 'tags' } MicLaTeXCanvas >> environment [ ^ self brush: MicLaTeXEnvironment new ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicLaTeXCanvas >> interpretedNextPut: aCharacter [ (LatexCharacters at: aCharacter ifAbsent: nil) @@ -104,7 +105,7 @@ MicLaTeXCanvas >> interpretedNextPut: aCharacter [ ifNotNil: [ :string | self raw: string ] ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicLaTeXCanvas >> nextPut: aCharacter [ writingRaw diff --git a/src/Microdown-LaTeXExporter/MicLaTeXCommand.class.st b/src/Microdown-LaTeXExporter/MicLaTeXCommand.class.st index 67a5d5b4..11eea55a 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXCommand.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXCommand.class.st @@ -8,12 +8,13 @@ To emit `\mycommand` potentially with arguments and optionals. ``` " Class { - #name : #MicLaTeXCommand, - #superclass : #MicLaTeXBrush, - #category : #'Microdown-LaTeXExporter' + #name : 'MicLaTeXCommand', + #superclass : 'MicLaTeXBrush', + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXCommand >> name: aString [ stream diff --git a/src/Microdown-LaTeXExporter/MicLaTeXEnvironment.class.st b/src/Microdown-LaTeXExporter/MicLaTeXEnvironment.class.st index a791ed79..37776e8c 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXEnvironment.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXEnvironment.class.st @@ -10,21 +10,22 @@ kjlkjkl ``` " Class { - #name : #MicLaTeXEnvironment, - #superclass : #MicLaTeXBrush, + #name : 'MicLaTeXEnvironment', + #superclass : 'MicLaTeXBrush', #instVars : [ 'name' ], - #category : #'Microdown-LaTeXExporter' + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXEnvironment >> name: aString [ name := aString. stream << '\begin{' << aString << '}' ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXEnvironment >> with: aBlock [ stream newLine. diff --git a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st index d461ffed..fcecc02f 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st @@ -2,22 +2,23 @@ I'm producing a textual latex version of a microdown document. " Class { - #name : #MicLaTeXWriter, - #superclass : #MicDocumentWriter, - #category : #'Microdown-LaTeXExporter' + #name : 'MicLaTeXWriter', + #superclass : 'MicDocumentWriter', + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriter class >> fileExtension [ ^ 'tex' ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriter class >> folderName [ ^ #latex ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriter class >> toLatexPath: aString [ "Replace all (windows style) back slashes in paths by (unix style) forward slashes. This is required as path in latex only support unix style pathes like @@ -33,28 +34,28 @@ MicLaTeXWriter class >> toLatexPath: aString [ ^ aString copyReplaceAll: '\' with: '/' ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriter class >> writerName [ ^ #miclatex ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriter >> canvas [ ^ canvas ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXWriter >> canvasClass [ ^ MicLaTeXCanvas ] -{ #category : #templating } +{ #category : 'templating' } MicLaTeXWriter >> chapterTemplateName [ ^ 'latexChapterTemplate' ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> createLinkToLabelWithAlias: anInternalLink [ canvas command name: 'hyperref'; @@ -65,7 +66,7 @@ MicLaTeXWriter >> createLinkToLabelWithAlias: anInternalLink [ canvas nextPutAll: anInternalLink alias ] ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> createLinkToLabelWithoutAlias: anInternalLink [ canvas command @@ -73,7 +74,7 @@ MicLaTeXWriter >> createLinkToLabelWithoutAlias: anInternalLink [ parameter: [ canvas raw: anInternalLink substring ] ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> getStringForAll: aCollection [ "Visit each element of aCollection and exports everything to a new stream. Answer the stream content." | visitor | @@ -82,7 +83,7 @@ MicLaTeXWriter >> getStringForAll: aCollection [ ^ visitor contents ] -{ #category : #'visiting-document' } +{ #category : 'visiting-document' } MicLaTeXWriter >> includeGraphicsFor: aFigure [ canvas command @@ -93,33 +94,33 @@ MicLaTeXWriter >> includeGraphicsFor: aFigure [ ] -{ #category : #protected } +{ #category : 'protected' } MicLaTeXWriter >> monospaceMacro [ ^ 'code' ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> protectUrl: aString [ ^ ((aString copyReplaceAll: '\' with: '\\') copyReplaceAll: '#' with: '\#') copyReplaceAll: '%' with: '\%' ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> sectioningCommands [ ^ #('part' 'chapter' 'section' 'subsection' 'subsubsection' 'paragraph' 'subparagraph') ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> tabList [ 0 to: nbListTab do: [ :nothing | canvas raw: ' ' ] ] -{ #category : #protected } +{ #category : 'protected' } MicLaTeXWriter >> tabularEnvironment [ ^ 'tabular' ] -{ #category : #'visiting-document' } +{ #category : 'visiting-document' } MicLaTeXWriter >> typeOfSectionFor: aHeader [ | sections level section | sections := self sectioningCommands. @@ -128,26 +129,26 @@ MicLaTeXWriter >> typeOfSectionFor: aHeader [ ^ section ] -{ #category : #blocks } +{ #category : 'blocks' } MicLaTeXWriter >> visitAnchor: anAnchor [ canvas command name: 'label'; parameter: anAnchor label ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitAnchorReference: anAchorReference [ self createLinkToLabelWithoutAlias: anAchorReference ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitBold: aBold [ canvas command name: 'textbf'; parameter: [ super visitBold: aBold ] ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitCitation: aCitation [ canvas command name: 'cite'; @@ -155,7 +156,7 @@ MicLaTeXWriter >> visitCitation: aCitation [ ] -{ #category : #'blocks - code' } +{ #category : 'blocks - code' } MicLaTeXWriter >> visitCode: aCodeBlock [ | env parameters | parameters := OrderedCollection new. @@ -175,7 +176,7 @@ MicLaTeXWriter >> visitCode: aCodeBlock [ canvas newLine ] ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitFigure: aFigure [ (aFigure hasCaption not and: [ aFigure hasLabel not ]) ifTrue: [ @@ -197,12 +198,12 @@ MicLaTeXWriter >> visitFigure: aFigure [ canvas newLine ] ] ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitFootnote: aFootnote [ canvas command name: 'footnote'; parameter: (aFootnote note) ] -{ #category : #blocks } +{ #category : 'blocks' } MicLaTeXWriter >> visitHeader: aHeader [ | section | canvas newLine. @@ -212,7 +213,7 @@ MicLaTeXWriter >> visitHeader: aHeader [ parameter: [ super visitHeader: aHeader ] ] -{ #category : #blocks } +{ #category : 'blocks' } MicLaTeXWriter >> visitHorizontalLine: aHorizontalLine [ canvas newLine. @@ -220,12 +221,12 @@ MicLaTeXWriter >> visitHorizontalLine: aHorizontalLine [ canvas newLine. ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitItalic: anItalic [ canvas command name: 'textit'; parameter: [ super visitItalic: anItalic ] ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitLink: aLink [ | text reference | reference := aLink fileStringWithoutHostFile. @@ -247,7 +248,7 @@ MicLaTeXWriter >> visitLink: aLink [ parameter: [ canvas command name: 'url'; parameter: (self protectUrl: reference) ] ] ] -{ #category : #'blocks - list' } +{ #category : 'blocks - list' } MicLaTeXWriter >> visitListItem: anItem [ self tabList. canvas command name: 'item'. @@ -256,14 +257,14 @@ MicLaTeXWriter >> visitListItem: anItem [ canvas newLine ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitMonospace: aMonospace [ canvas command name: self monospaceMacro; parameter: [ super visitMonospace: aMonospace ] ] -{ #category : #'blocks - list' } +{ #category : 'blocks - list' } MicLaTeXWriter >> visitOrderedList: aList [ "tabulation for \begin{itemize} it can do in the environment of the canvas" canvas newLine. @@ -278,14 +279,14 @@ MicLaTeXWriter >> visitOrderedList: aList [ nbListTab = -1 ifTrue: [canvas newLine] ] -{ #category : #blocks } +{ #category : 'blocks' } MicLaTeXWriter >> visitParagraph: aParagraph [ canvas newLine. super visitParagraph: aParagraph. canvas newLine. ] -{ #category : #blocks } +{ #category : 'blocks' } MicLaTeXWriter >> visitQuote: aQuote [ canvas environment name: 'verbatim'; @@ -294,12 +295,12 @@ MicLaTeXWriter >> visitQuote: aQuote [ canvas newLine ] ] ] -{ #category : #'blocks - inline' } +{ #category : 'blocks - inline' } MicLaTeXWriter >> visitStrike: aStrike [ canvas command name: 'sout'; parameter: [ super visitStrike: aStrike ] ] -{ #category : #'blocks - table' } +{ #category : 'blocks - table' } MicLaTeXWriter >> visitTable: aTable [ | environment | canvas newLine. @@ -316,7 +317,7 @@ MicLaTeXWriter >> visitTable: aTable [ canvas newLine ] ] -{ #category : #'blocks - table' } +{ #category : 'blocks - table' } MicLaTeXWriter >> visitTableCell: aCell [ aCell isAligned ifFalse: [ self writeTableCellContent: aCell ] @@ -328,12 +329,12 @@ MicLaTeXWriter >> visitTableCell: aCell [ parameter: [ self writeTableCellContent: aCell ] ] ] -{ #category : #'blocks - table' } +{ #category : 'blocks - table' } MicLaTeXWriter >> visitTableCell: aCell with: aBool [ self writeTableCellContent: aCell with: aBool ] -{ #category : #'blocks - table' } +{ #category : 'blocks - table' } MicLaTeXWriter >> visitTableRow: aRow [ self visitAll: aRow children separatedBy: [ canvas raw: ' & ' ]. canvas @@ -345,7 +346,7 @@ MicLaTeXWriter >> visitTableRow: aRow [ canvas newLine ] ] -{ #category : #'blocks - table' } +{ #category : 'blocks - table' } MicLaTeXWriter >> visitTableRow: aRow with: aBool at: anIndex [ aRow do: [ :cell | self visitTableCell: cell with: (aBool and: [ anIndex = 1 ]) ] separatedBy: [ canvas raw: ' & ' ]. canvas @@ -357,13 +358,13 @@ MicLaTeXWriter >> visitTableRow: aRow with: aBool at: anIndex [ canvas newLine ] ] -{ #category : #blocks } +{ #category : 'blocks' } MicLaTeXWriter >> visitText: aText [ canvas nextPutAllLines: aText substring ] -{ #category : #'blocks - list' } +{ #category : 'blocks - list' } MicLaTeXWriter >> visitUnorderedList: aList [ "tabulation for \begin{itemize} it can do in the environment of the canvas" @@ -379,12 +380,12 @@ MicLaTeXWriter >> visitUnorderedList: aList [ nbListTab = -1 ifTrue: [canvas newLine] ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> writeCaptionOfExternalLink: anExternalLink [ self visitAll: anExternalLink captionElements ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> writeGraphicsParametersOfExternalLink: anExternalLink [ canvas @@ -395,7 +396,7 @@ MicLaTeXWriter >> writeGraphicsParametersOfExternalLink: anExternalLink [ raw: '\textwidth' ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> writeLabelOfExternalLink: anExternalLink [ "we decided not to create an arbitrary label when there is none specified. This decision should be changed but we need to find a way to uniquely identify a figure, math, ..." @@ -410,7 +411,7 @@ MicLaTeXWriter >> writeLabelOfExternalLink: anExternalLink [ parameter: [ canvas raw: label ] ] ] -{ #category : #helpers } +{ #category : 'helpers' } MicLaTeXWriter >> writeTableCellContent: aCell [ ^ aCell isHeading ifTrue: [ @@ -420,7 +421,7 @@ MicLaTeXWriter >> writeTableCellContent: aCell [ ifFalse: [ super visitTableCell: aCell ] ] -{ #category : #'blocks - table' } +{ #category : 'blocks - table' } MicLaTeXWriter >> writeTableCellContent: aCell with: aBool [ ^ aBool ifTrue: [ diff --git a/src/Microdown-LaTeXExporter/MicLatexPathUpdateVisitor.class.st b/src/Microdown-LaTeXExporter/MicLatexPathUpdateVisitor.class.st index 584fd004..1b52e3e8 100644 --- a/src/Microdown-LaTeXExporter/MicLatexPathUpdateVisitor.class.st +++ b/src/Microdown-LaTeXExporter/MicLatexPathUpdateVisitor.class.st @@ -10,40 +10,41 @@ C:/Program Files/Something For now I'm a copy and paste from Pillar (to avoid to have to patch all the visit API). " Class { - #name : #MicLatexPathUpdateVisitor, - #superclass : #MicrodownVisitor, - #category : #'Microdown-LaTeXExporter' + #name : 'MicLatexPathUpdateVisitor', + #superclass : 'MicrodownVisitor', + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #visiting } +{ #category : 'visiting' } MicLatexPathUpdateVisitor class >> isAbstract [ ^ false ] -{ #category : #visiting } +{ #category : 'visiting' } MicLatexPathUpdateVisitor class >> key [ ^ #latexPathUpdate ] -{ #category : #visiting } +{ #category : 'visiting' } MicLatexPathUpdateVisitor class >> start: aDocument [ ^ self new start: aDocument ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicLatexPathUpdateVisitor >> newReferenceFor: aReference [ ^ aReference reference copyReplaceAll: '\' with: '/' ] -{ #category : #visiting } +{ #category : 'visiting' } MicLatexPathUpdateVisitor >> visitFigure: aFigure [ aFigure reference: (self newReferenceFor: aFigure). super visitFigure: aFigure ] -{ #category : #unused } +{ #category : 'unused' } MicLatexPathUpdateVisitor >> visitInternalLink: anInternalLink [ anInternalLink hasReference ifTrue: [ anInternalLink reference: (self newReferenceFor: anInternalLink) ]. diff --git a/src/Microdown-LaTeXExporter/MicSBALaTeXWriter.class.st b/src/Microdown-LaTeXExporter/MicSBALaTeXWriter.class.st index 54d082aa..ded66bf6 100644 --- a/src/Microdown-LaTeXExporter/MicSBALaTeXWriter.class.st +++ b/src/Microdown-LaTeXExporter/MicSBALaTeXWriter.class.st @@ -3,27 +3,28 @@ I'm version producing LaTeX for the SBA template. In the future (once the templatedWriter is working) I should get removed. " Class { - #name : #MicSBALaTeXWriter, - #superclass : #MicLaTeXWriter, - #category : #'Microdown-LaTeXExporter' + #name : 'MicSBALaTeXWriter', + #superclass : 'MicLaTeXWriter', + #category : 'Microdown-LaTeXExporter', + #package : 'Microdown-LaTeXExporter' } -{ #category : #accessing } +{ #category : 'accessing' } MicSBALaTeXWriter class >> writerName [ ^ #miclatex:sbabook ] -{ #category : #accessing } +{ #category : 'accessing' } MicSBALaTeXWriter >> folderName [ ^ #latex ] -{ #category : #protected } +{ #category : 'protected' } MicSBALaTeXWriter >> monospaceMacro [ ^ 'textcode' ] -{ #category : #protected } +{ #category : 'protected' } MicSBALaTeXWriter >> optionalParametersForFloatingScript: aCodeBlock [ | parameters | @@ -33,17 +34,17 @@ MicSBALaTeXWriter >> optionalParametersForFloatingScript: aCodeBlock [ ^ parameters asCommaString ] -{ #category : #protected } +{ #category : 'protected' } MicSBALaTeXWriter >> tabularEnvironment [ ^ 'fullwidthtabular' ] -{ #category : #accessing } +{ #category : 'accessing' } MicSBALaTeXWriter >> templateForConfiguration: aConfiguration [ ^ 'main.mustache' ] -{ #category : #protected } +{ #category : 'protected' } MicSBALaTeXWriter >> visitCode: aCodeBlock [ aCodeBlock hasCaption | aCodeBlock hasLabel @@ -51,7 +52,7 @@ MicSBALaTeXWriter >> visitCode: aCodeBlock [ ifFalse: [ self writeInFlowCodeSnippet: aCodeBlock ] ] -{ #category : #protected } +{ #category : 'protected' } MicSBALaTeXWriter >> writeFloatingCodeSnippet: aCodeBlock [ canvas environment name: 'listing'; @@ -65,7 +66,7 @@ MicSBALaTeXWriter >> writeFloatingCodeSnippet: aCodeBlock [ canvas newLine ] ] -{ #category : #protected } +{ #category : 'protected' } MicSBALaTeXWriter >> writeInFlowCodeSnippet: aCodeBlock [ canvas environment name: 'displaycode'; diff --git a/src/Microdown-LaTeXExporter/MicTableBlock.extension.st b/src/Microdown-LaTeXExporter/MicTableBlock.extension.st index 80128b30..45f80f17 100644 --- a/src/Microdown-LaTeXExporter/MicTableBlock.extension.st +++ b/src/Microdown-LaTeXExporter/MicTableBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicTableBlock } +Extension { #name : 'MicTableBlock' } -{ #category : #'*Microdown-LaTeXExporter' } +{ #category : '*Microdown-LaTeXExporter' } MicTableBlock >> latexSpecification [ ^ String new: rows first size withAll: $l ] diff --git a/src/Microdown-LaTeXExporter/package.st b/src/Microdown-LaTeXExporter/package.st index d2fbf944..f335d1cf 100644 --- a/src/Microdown-LaTeXExporter/package.st +++ b/src/Microdown-LaTeXExporter/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-LaTeXExporter' } +Package { #name : 'Microdown-LaTeXExporter' } diff --git a/src/Microdown-Macrodown-Pillar/MacLineBreakBlock.extension.st b/src/Microdown-Macrodown-Pillar/MacLineBreakBlock.extension.st index 693e4df1..ec644004 100644 --- a/src/Microdown-Macrodown-Pillar/MacLineBreakBlock.extension.st +++ b/src/Microdown-Macrodown-Pillar/MacLineBreakBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MacLineBreakBlock } +Extension { #name : 'MacLineBreakBlock' } -{ #category : #'*Microdown-Macrodown-Pillar' } +{ #category : '*Microdown-Macrodown-Pillar' } MacLineBreakBlock >> associatedPillarClass [ ^ PRLineBreak diff --git a/src/Microdown-Macrodown-Pillar/package.st b/src/Microdown-Macrodown-Pillar/package.st index b67a073c..3d050b36 100644 --- a/src/Microdown-Macrodown-Pillar/package.st +++ b/src/Microdown-Macrodown-Pillar/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Macrodown-Pillar' } +Package { #name : 'Microdown-Macrodown-Pillar' } diff --git a/src/Microdown-Macrodown-Tests/MacInlineParserTest.class.st b/src/Microdown-Macrodown-Tests/MacInlineParserTest.class.st index ad306095..7c80a6c1 100644 --- a/src/Microdown-Macrodown-Tests/MacInlineParserTest.class.st +++ b/src/Microdown-Macrodown-Tests/MacInlineParserTest.class.st @@ -1,16 +1,17 @@ Class { - #name : #MacInlineParserTest, - #superclass : #MicInlineParserTest, - #category : #'Microdown-Macrodown-Tests' + #name : 'MacInlineParserTest', + #superclass : 'MicInlineParserTest', + #category : 'Microdown-Macrodown-Tests', + #package : 'Microdown-Macrodown-Tests' } -{ #category : #accessing } +{ #category : 'accessing' } MacInlineParserTest >> splitter [ ^ MacInlineParser new ] -{ #category : #tests } +{ #category : 'tests' } MacInlineParserTest >> testParseLineBreak [ | blocks | @@ -22,7 +23,7 @@ x2 self assert: blocks second class equals: MacLineBreakBlock ] -{ #category : #tests } +{ #category : 'tests' } MacInlineParserTest >> testParseLineBreakManySpaces [ | blocks | diff --git a/src/Microdown-Macrodown-Tests/MacParagraphBlockTest.class.st b/src/Microdown-Macrodown-Tests/MacParagraphBlockTest.class.st index 05b890b7..b70c2349 100644 --- a/src/Microdown-Macrodown-Tests/MacParagraphBlockTest.class.st +++ b/src/Microdown-Macrodown-Tests/MacParagraphBlockTest.class.st @@ -1,16 +1,17 @@ Class { - #name : #MacParagraphBlockTest, - #superclass : #MicParagraphBlockTest, - #category : #'Microdown-Macrodown-Tests' + #name : 'MacParagraphBlockTest', + #superclass : 'MicParagraphBlockTest', + #category : 'Microdown-Macrodown-Tests', + #package : 'Microdown-Macrodown-Tests' } -{ #category : #accessing } +{ #category : 'accessing' } MacParagraphBlockTest >> parserClass [ ^ MacrodownParser ] -{ #category : #tests } +{ #category : 'tests' } MacParagraphBlockTest >> testTwoSingleLinesWithSpaces [ | root paragraph | diff --git a/src/Microdown-Macrodown-Tests/package.st b/src/Microdown-Macrodown-Tests/package.st index 49afc124..10181bf2 100644 --- a/src/Microdown-Macrodown-Tests/package.st +++ b/src/Microdown-Macrodown-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Macrodown-Tests' } +Package { #name : 'Microdown-Macrodown-Tests' } diff --git a/src/Microdown-Macrodown/MacConstants.class.st b/src/Microdown-Macrodown/MacConstants.class.st index 7d24510d..601ee713 100644 --- a/src/Microdown-Macrodown/MacConstants.class.st +++ b/src/Microdown-Macrodown/MacConstants.class.st @@ -2,15 +2,16 @@ Constants to be used on the extended parser. " Class { - #name : #MacConstants, - #superclass : #SharedPool, + #name : 'MacConstants', + #superclass : 'SharedPool', #classVars : [ 'InlineParagraphDelimiter' ], - #category : #'Microdown-Macrodown' + #category : 'Microdown-Macrodown', + #package : 'Microdown-Macrodown' } -{ #category : #initialization } +{ #category : 'initialization' } MacConstants class >> initialize [ InlineParagraphDelimiter := ' ' diff --git a/src/Microdown-Macrodown/MacInlineParser.class.st b/src/Microdown-Macrodown/MacInlineParser.class.st index cc635c6d..2ea214ff 100644 --- a/src/Microdown-Macrodown/MacInlineParser.class.st +++ b/src/Microdown-Macrodown/MacInlineParser.class.st @@ -4,15 +4,16 @@ Inline parser to detect and parse extended parse functionality. - line break with two (or more) spaces. " Class { - #name : #MacInlineParser, - #superclass : #MicInlineParser, + #name : 'MacInlineParser', + #superclass : 'MicInlineParser', #pools : [ 'MacConstants' ], - #category : #'Microdown-Macrodown' + #category : 'Microdown-Macrodown', + #package : 'Microdown-Macrodown' } -{ #category : #adding } +{ #category : 'adding' } MacInlineParser >> addLineBreakInlineBlock: indexOfAssociateOpener [ | startIndex endIndex | @@ -28,13 +29,13 @@ MacInlineParser >> addLineBreakInlineBlock: indexOfAssociateOpener [ to: endIndex ] -{ #category : #private } +{ #category : 'private' } MacInlineParser >> extentedDelimiters [ ^ { MacLineBreakDelimiter } ] -{ #category : #actions } +{ #category : 'actions' } MacInlineParser >> identifyMarkupFor: aString [ ^ self extentedDelimiters @@ -45,7 +46,7 @@ MacInlineParser >> identifyMarkupFor: aString [ ifNone: [ super identifyMarkupFor: aString ] ] -{ #category : #applying } +{ #category : 'applying' } MacInlineParser >> processLineBreak [ self delimiterFoundProcess. diff --git a/src/Microdown-Macrodown/MacLineBreakBlock.class.st b/src/Microdown-Macrodown/MacLineBreakBlock.class.st index 2c3d681c..3b70293a 100644 --- a/src/Microdown-Macrodown/MacLineBreakBlock.class.st +++ b/src/Microdown-Macrodown/MacLineBreakBlock.class.st @@ -2,30 +2,31 @@ Block to process line breaks. " Class { - #name : #MacLineBreakBlock, - #superclass : #MicInlineElement, - #category : #'Microdown-Macrodown' + #name : 'MacLineBreakBlock', + #superclass : 'MicInlineElement', + #category : 'Microdown-Macrodown', + #package : 'Microdown-Macrodown' } -{ #category : #visiting } +{ #category : 'visiting' } MacLineBreakBlock >> accept: aVisitor [ ^ aVisitor visitLineBreak: self ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakBlock >> kind [ ^ #lineBreak ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakBlock >> openingDelimiter [ ^ nil ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakBlock >> openingDelimiterSize [ ^ 0 diff --git a/src/Microdown-Macrodown/MacLineBreakDelimiter.class.st b/src/Microdown-Macrodown/MacLineBreakDelimiter.class.st index 0b87ab28..130e82b4 100644 --- a/src/Microdown-Macrodown/MacLineBreakDelimiter.class.st +++ b/src/Microdown-Macrodown/MacLineBreakDelimiter.class.st @@ -2,42 +2,43 @@ Delimiter definition for line break. " Class { - #name : #MacLineBreakDelimiter, - #superclass : #MicAbstractDelimiter, - #category : #'Microdown-Macrodown' + #name : 'MacLineBreakDelimiter', + #superclass : 'MicAbstractDelimiter', + #category : 'Microdown-Macrodown', + #package : 'Microdown-Macrodown' } -{ #category : #applying } +{ #category : 'applying' } MacLineBreakDelimiter class >> applyOn: inlineParser [ ^ inlineParser processLineBreak ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakDelimiter class >> associatedInlineBlock [ ^ MacLineBreakBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakDelimiter class >> isCloser [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakDelimiter class >> isOpener [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakDelimiter class >> markup [ ^ #lineBreak ] -{ #category : #testing } +{ #category : 'testing' } MacLineBreakDelimiter class >> matches: aString [ | indexOfCr | @@ -49,26 +50,26 @@ MacLineBreakDelimiter class >> matches: aString [ ^ (aString first: indexOfCr) allSatisfy: [ :each | each = Character space ] ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakDelimiter class >> size [ ^ 1 ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakDelimiter class >> type [ ^ #lineBreak ] -{ #category : #adding } +{ #category : 'adding' } MacLineBreakDelimiter >> addInlineBlock: anIndex to: inlineParser [ inlineParser addLineBreakInlineBlock: anIndex ] -{ #category : #accessing } +{ #category : 'accessing' } MacLineBreakDelimiter >> endIndex [ ^ self index + self size diff --git a/src/Microdown-Macrodown/MacMailtoResourceReference.class.st b/src/Microdown-Macrodown/MacMailtoResourceReference.class.st index 635f3a36..beddf805 100644 --- a/src/Microdown-Macrodown/MacMailtoResourceReference.class.st +++ b/src/Microdown-Macrodown/MacMailtoResourceReference.class.st @@ -2,17 +2,18 @@ Definition of ""mailto"" scheme (to let the links recognise it). " Class { - #name : #MacMailtoResourceReference, - #superclass : #MicAbsoluteResourceReference, - #category : #'Microdown-Macrodown' + #name : 'MacMailtoResourceReference', + #superclass : 'MicAbsoluteResourceReference', + #category : 'Microdown-Macrodown', + #package : 'Microdown-Macrodown' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } MacMailtoResourceReference class >> handlesUriScheme: scheme [ ^ scheme beginsWith: 'mailto' ] -{ #category : #accessing } +{ #category : 'accessing' } MacMailtoResourceReference >> contents [ ^ self error: 'Should not arrive here?' diff --git a/src/Microdown-Macrodown/MacParagraphBlock.class.st b/src/Microdown-Macrodown/MacParagraphBlock.class.st index d6cbaadb..8431f9c7 100644 --- a/src/Microdown-Macrodown/MacParagraphBlock.class.st +++ b/src/Microdown-Macrodown/MacParagraphBlock.class.st @@ -2,18 +2,19 @@ Paragraph extension to process the extended inlines. " Class { - #name : #MacParagraphBlock, - #superclass : #MicParagraphBlock, + #name : 'MacParagraphBlock', + #superclass : 'MicParagraphBlock', #instVars : [ 'textWithoutBreak' ], #pools : [ 'MacConstants' ], - #category : #'Microdown-Macrodown' + #category : 'Microdown-Macrodown', + #package : 'Microdown-Macrodown' } -{ #category : #parising } +{ #category : 'parising' } MacParagraphBlock >> addLineAndReturnNextNode: line [ super addLineAndReturnNextNode: line. @@ -26,7 +27,7 @@ MacParagraphBlock >> addLineAndReturnNextNode: line [ textWithoutBreak := nil ] -{ #category : #visiting } +{ #category : 'visiting' } MacParagraphBlock >> closeMe [ textWithoutBreak ifNil: [ diff --git a/src/Microdown-Macrodown/MacRawParagraphBlock.class.st b/src/Microdown-Macrodown/MacRawParagraphBlock.class.st index 7fde0ec3..7db25fa9 100644 --- a/src/Microdown-Macrodown/MacRawParagraphBlock.class.st +++ b/src/Microdown-Macrodown/MacRawParagraphBlock.class.st @@ -2,24 +2,25 @@ A raw paragraph block is a block that containes raw content (e.g. plain HTML) " Class { - #name : #MacRawParagraphBlock, - #superclass : #MicParagraphBlock, - #category : #'Microdown-Macrodown' + #name : 'MacRawParagraphBlock', + #superclass : 'MicParagraphBlock', + #category : 'Microdown-Macrodown', + #package : 'Microdown-Macrodown' } -{ #category : #private } +{ #category : 'private' } MacRawParagraphBlock class >> htmlTags [ ^ #('!--' 'a' 'abbr' 'address' 'area' 'article' 'aside' 'audio' 'b' 'base' 'bdi' 'bdo' 'blockquote' 'body' 'br' 'button' 'canvas' 'caption' 'cite' 'code' 'col' 'colgroup' 'data' 'datalist' 'dd' 'del' 'details' 'dfn' 'dialog' 'div' 'dl' 'dt' 'em' 'embed' 'fieldset' 'figcaption' 'figure' 'footer' 'form' 'h1' 'h2' 'h3' 'h4' 'h5' 'h6' 'head' 'header' 'hgroup' 'hr' 'html' 'i' 'iframe' 'img' 'input' 'ins' 'kbd' 'label' 'legend' 'li' 'link' 'main' 'map' 'mark' 'menu' 'meta' 'meter' 'nav' 'noscript' 'object' 'ol' 'optgroup' 'option' 'output' 'p' 'param' 'picture' 'pre' 'progress' 'q' 'rb' 'rp' 'rt' 'rtc' 'ruby' 's' 'samp' 'script' 'section' 'select' 'slot' 'small' 'source' 'span' 'strong' 'style' 'sub' 'summary' 'sup' 'table' 'tbody' 'td' 'template' 'textarea' 'tfoot' 'th' 'thead' 'time' 'title' 'tr' 'track' 'u' 'ul' 'var' 'video' 'wbr') ] -{ #category : #testing } +{ #category : 'testing' } MacRawParagraphBlock class >> matches: aString [ ^ self matches: aString trimLeft withAnyOf: self htmlTags ] -{ #category : #private } +{ #category : 'private' } MacRawParagraphBlock class >> matches: aString withAnyOf: htmlTags [ aString ifEmpty: [ ^ false ]. @@ -27,7 +28,7 @@ MacRawParagraphBlock class >> matches: aString withAnyOf: htmlTags [ and: [ htmlTags includes: (aString readStream upToAnyOf: '> ') allButFirst ] ] -{ #category : #testing } +{ #category : 'testing' } MacRawParagraphBlock class >> matchesComment: aString [ ^ self @@ -35,13 +36,13 @@ MacRawParagraphBlock class >> matchesComment: aString [ withAnyOf: { self htmlTags first } ] -{ #category : #visiting } +{ #category : 'visiting' } MacRawParagraphBlock >> accept: aVisitor [ ^ aVisitor visitRawParagraph: self ] -{ #category : #'parse support' } +{ #category : 'parse support' } MacRawParagraphBlock >> closeMe [ self children: { diff --git a/src/Microdown-Macrodown/MacrodownParser.class.st b/src/Microdown-Macrodown/MacrodownParser.class.st index 96807cd5..a91b598f 100644 --- a/src/Microdown-Macrodown/MacrodownParser.class.st +++ b/src/Microdown-Macrodown/MacrodownParser.class.st @@ -2,12 +2,13 @@ This is a variation of the MicrodownParser that tries to be as close as possible to the ""markdown strict"" definition, that can be seen here: https://www.markdownguide.org/basic-syntax. " Class { - #name : #MacrodownParser, - #superclass : #MicrodownParser, - #category : #'Microdown-Macrodown' + #name : 'MacrodownParser', + #superclass : 'MicrodownParser', + #category : 'Microdown-Macrodown', + #package : 'Microdown-Macrodown' } -{ #category : #public } +{ #category : 'public' } MacrodownParser >> blockStarterClassFrom: line [ self flag: #HACK. "This is a special case because it collides with environment" @@ -17,7 +18,7 @@ MacrodownParser >> blockStarterClassFrom: line [ ^ super blockStarterClassFrom: line ] -{ #category : #'node creation' } +{ #category : 'node creation' } MacrodownParser >> elementBlockClasses [ ^ { @@ -25,7 +26,7 @@ MacrodownParser >> elementBlockClasses [ } ] -{ #category : #'node creation' } +{ #category : 'node creation' } MacrodownParser >> nonMatchedBlockClassFor: line [ ^ self elementBlockClasses @@ -34,7 +35,7 @@ MacrodownParser >> nonMatchedBlockClassFor: line [ ifNone: [ self paragraphBlockClass ] ] -{ #category : #'node creation' } +{ #category : 'node creation' } MacrodownParser >> paragraphBlockClass [ ^ MacParagraphBlock diff --git a/src/Microdown-Macrodown/MicAbstractDelimiter.extension.st b/src/Microdown-Macrodown/MicAbstractDelimiter.extension.st index 8f3164cf..762118cb 100644 --- a/src/Microdown-Macrodown/MicAbstractDelimiter.extension.st +++ b/src/Microdown-Macrodown/MicAbstractDelimiter.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #MicAbstractDelimiter } +Extension { #name : 'MicAbstractDelimiter' } -{ #category : #'*Microdown-Macrodown' } +{ #category : '*Microdown-Macrodown' } MicAbstractDelimiter class >> applyOn: inlineParser [ self subclassResponsibility ] -{ #category : #'*Microdown-Macrodown' } +{ #category : '*Microdown-Macrodown' } MicAbstractDelimiter class >> matches: aString [ ^ false diff --git a/src/Microdown-Macrodown/MicMicrodownObjectToPillarObjectConverter.extension.st b/src/Microdown-Macrodown/MicMicrodownObjectToPillarObjectConverter.extension.st index 10c8429e..ed19d8c0 100644 --- a/src/Microdown-Macrodown/MicMicrodownObjectToPillarObjectConverter.extension.st +++ b/src/Microdown-Macrodown/MicMicrodownObjectToPillarObjectConverter.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #MicMicrodownObjectToPillarObjectConverter } +Extension { #name : 'MicMicrodownObjectToPillarObjectConverter' } -{ #category : #'*Microdown-Macrodown' } +{ #category : '*Microdown-Macrodown' } MicMicrodownObjectToPillarObjectConverter >> visitLineBreak: aBreak [ ^ PRLineBreak new ] -{ #category : #'*Microdown-Macrodown' } +{ #category : '*Microdown-Macrodown' } MicMicrodownObjectToPillarObjectConverter >> visitRawParagraph: aRawParagraph [ ^ PRRaw content: aRawParagraph text diff --git a/src/Microdown-Macrodown/MicrodownVisitor.extension.st b/src/Microdown-Macrodown/MicrodownVisitor.extension.st index e763473e..e5dc523a 100644 --- a/src/Microdown-Macrodown/MicrodownVisitor.extension.st +++ b/src/Microdown-Macrodown/MicrodownVisitor.extension.st @@ -1,11 +1,11 @@ -Extension { #name : #MicrodownVisitor } +Extension { #name : 'MicrodownVisitor' } -{ #category : #'*Microdown-Macrodown' } +{ #category : '*Microdown-Macrodown' } MicrodownVisitor >> visitLineBreak: aBreak [ ] -{ #category : #'*Microdown-Macrodown' } +{ #category : '*Microdown-Macrodown' } MicrodownVisitor >> visitRawParagraph: aRawParagraph [ ^ self visitChildrenOf: aRawParagraph diff --git a/src/Microdown-Macrodown/package.st b/src/Microdown-Macrodown/package.st index f1977b3d..acbb4904 100644 --- a/src/Microdown-Macrodown/package.st +++ b/src/Microdown-Macrodown/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Macrodown' } +Package { #name : 'Microdown-Macrodown' } diff --git a/src/Microdown-MathFlaky-Tests/MicRichTextComposerTest.extension.st b/src/Microdown-MathFlaky-Tests/MicRichTextComposerTest.extension.st index 3c0b225b..be9acea2 100644 --- a/src/Microdown-MathFlaky-Tests/MicRichTextComposerTest.extension.st +++ b/src/Microdown-MathFlaky-Tests/MicRichTextComposerTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicRichTextComposerTest } +Extension { #name : 'MicRichTextComposerTest' } -{ #category : #'*Microdown-MathFlaky-Tests' } +{ #category : '*Microdown-MathFlaky-Tests' } MicRichTextComposerTest >> testClassExamplesNotBroken [ "I merely test that the examples do not break" @@ -10,7 +10,7 @@ MicRichTextComposerTest >> testClassExamplesNotBroken [ examples do: [ :selector | MicRichTextComposer perform: selector ] ] -{ #category : #'*Microdown-MathFlaky-Tests' } +{ #category : '*Microdown-MathFlaky-Tests' } MicRichTextComposerTest >> testLatexMathStyle [ | source1 source2 richText1 richText2 | @@ -22,7 +22,7 @@ MicRichTextComposerTest >> testLatexMathStyle [ self assert: richText1 asMorph height < richText2 asMorph height ] -{ #category : #'*Microdown-MathFlaky-Tests' } +{ #category : '*Microdown-MathFlaky-Tests' } MicRichTextComposerTest >> testMathEnvironment [ | source1 source2 richText1 richText2 | "this checks if latex is working by making two formulas, of which the second should be taller" diff --git a/src/Microdown-MathFlaky-Tests/package.st b/src/Microdown-MathFlaky-Tests/package.st index df5da1b1..aac8dac3 100644 --- a/src/Microdown-MathFlaky-Tests/package.st +++ b/src/Microdown-MathFlaky-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-MathFlaky-Tests' } +Package { #name : 'Microdown-MathFlaky-Tests' } diff --git a/src/Microdown-Pharo-Tools/MicElement.extension.st b/src/Microdown-Pharo-Tools/MicElement.extension.st index a15a1c47..14a67581 100644 --- a/src/Microdown-Pharo-Tools/MicElement.extension.st +++ b/src/Microdown-Pharo-Tools/MicElement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicElement } +Extension { #name : 'MicElement' } -{ #category : #'*Microdown-Pharo-Tools' } +{ #category : '*Microdown-Pharo-Tools' } MicElement >> inspectionMicTree [ " (MicroDownParser parse: '# hello diff --git a/src/Microdown-Pharo-Tools/package.st b/src/Microdown-Pharo-Tools/package.st index c4b07b1b..6271824c 100644 --- a/src/Microdown-Pharo-Tools/package.st +++ b/src/Microdown-Pharo-Tools/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Pharo-Tools' } +Package { #name : 'Microdown-Pharo-Tools' } diff --git a/src/Microdown-Pillar-Tests/MicAnchorBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicAnchorBlockTest.extension.st index bc13db1f..aa54b624 100644 --- a/src/Microdown-Pillar-Tests/MicAnchorBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicAnchorBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicAnchorBlockTest } +Extension { #name : 'MicAnchorBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicAnchorBlockTest >> testAnchorBlockAsPillar [ | source root pillar | source := '@anchor'. diff --git a/src/Microdown-Pillar-Tests/MicCodeBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicCodeBlockTest.extension.st index 0d7b4be9..adf4f503 100644 --- a/src/Microdown-Pillar-Tests/MicCodeBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicCodeBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicCodeBlockTest } +Extension { #name : 'MicCodeBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicCodeBlockTest >> testSingleCodeBlockTwoLinesAsPillar [ | source root code textBody argument | textBody := 'my fancy code diff --git a/src/Microdown-Pillar-Tests/MicEnvironmentBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicEnvironmentBlockTest.extension.st index 6f9ab7c3..50b274d7 100644 --- a/src/Microdown-Pillar-Tests/MicEnvironmentBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicEnvironmentBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicEnvironmentBlockTest } +Extension { #name : 'MicEnvironmentBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicEnvironmentBlockTest >> testEnvironmentBlockAsPillar [ | source root pillar | source := '> testEnvironmentBlockWithParametersAsPillar [ | source root pillar | source := '> testHeaderLevel4AsPillar [ | source root pillar | source := '#### Level four'. diff --git a/src/Microdown-Pillar-Tests/MicHorizontalLineBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicHorizontalLineBlockTest.extension.st index bc1658cb..83f1f315 100644 --- a/src/Microdown-Pillar-Tests/MicHorizontalLineBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicHorizontalLineBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicHorizontalLineBlockTest } +Extension { #name : 'MicHorizontalLineBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicHorizontalLineBlockTest >> testHorizontalLineBlockAsPillar [ | source root pillar | source := '*** diff --git a/src/Microdown-Pillar-Tests/MicInlineParserTest.extension.st b/src/Microdown-Pillar-Tests/MicInlineParserTest.extension.st index e64e1c6d..f1a113a5 100644 --- a/src/Microdown-Pillar-Tests/MicInlineParserTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicInlineParserTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicInlineParserTest } +Extension { #name : 'MicInlineParserTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicInlineParserTest >> testBasicTextAsPillar [ | res | res := self splitter pillarFrom: 'abc'. @@ -8,7 +8,7 @@ MicInlineParserTest >> testBasicTextAsPillar [ self assert: res first class equals: PRText. ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicInlineParserTest >> testBoldAndNestedItalicAsPillar [ | res | res := self splitter pillarFrom: 'abc**x_y_z**cba'. @@ -19,7 +19,7 @@ MicInlineParserTest >> testBoldAndNestedItalicAsPillar [ self assert: res second children third text equals: 'z' ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicInlineParserTest >> testBoldAsPillar [ | res | res := self splitter pillarFrom: 'abc**xyz**cba'. @@ -27,7 +27,7 @@ MicInlineParserTest >> testBoldAsPillar [ self assert: res second class equals: PRBoldFormat. ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicInlineParserTest >> testExternalLinkAsPillar [ | res | res := self splitter pillarFrom: 'abc[alias](link)cba'. @@ -36,7 +36,7 @@ MicInlineParserTest >> testExternalLinkAsPillar [ ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicInlineParserTest >> testFigureAsPillar [ | res | res := self splitter pillarFrom: 'abc![alias](http://www.pharo.org)cba'. @@ -45,7 +45,7 @@ MicInlineParserTest >> testFigureAsPillar [ ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicInlineParserTest >> testItalicAsPillar [ | res | res := self splitter pillarFrom: 'abc_xyz_cba'. diff --git a/src/Microdown-Pillar-Tests/MicMathBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicMathBlockTest.extension.st index 219b1cf5..bedeedc6 100644 --- a/src/Microdown-Pillar-Tests/MicMathBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicMathBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicMathBlockTest } +Extension { #name : 'MicMathBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicMathBlockTest >> testMathBlockAsPillar [ | source root pillar | source := ' @@ -14,7 +14,7 @@ root := parser parse: source. ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicMathBlockTest >> testMathBlockAsPillarWithArgument [ | source root pillar | source := ' @@ -30,7 +30,7 @@ V_i = C_0 - C_3 ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicMathBlockTest >> testMathBlockAsPillarWithArgumentWithFormatting [ | source root pillar | source := ' diff --git a/src/Microdown-Pillar-Tests/MicMicrodownObjectToPillarObjectConverterTest.class.st b/src/Microdown-Pillar-Tests/MicMicrodownObjectToPillarObjectConverterTest.class.st index 5e1ba650..75fb44a8 100644 --- a/src/Microdown-Pillar-Tests/MicMicrodownObjectToPillarObjectConverterTest.class.st +++ b/src/Microdown-Pillar-Tests/MicMicrodownObjectToPillarObjectConverterTest.class.st @@ -1,15 +1,16 @@ Class { - #name : #MicMicrodownObjectToPillarObjectConverterTest, - #superclass : #TestCase, + #name : 'MicMicrodownObjectToPillarObjectConverterTest', + #superclass : 'TestCase', #instVars : [ 'pillarDocument', 'visitor', 'factory' ], - #category : #'Microdown-Pillar-Tests' + #category : 'Microdown-Pillar-Tests', + #package : 'Microdown-Pillar-Tests' } -{ #category : #parsing } +{ #category : 'parsing' } MicMicrodownObjectToPillarObjectConverterTest >> parse: sample createChildElementOfClass: aClass [ | parser micDoc pillarDoc | @@ -20,7 +21,7 @@ MicMicrodownObjectToPillarObjectConverterTest >> parse: sample createChildElemen ^ pillarDoc ] -{ #category : #parsing } +{ #category : 'parsing' } MicMicrodownObjectToPillarObjectConverterTest >> parse: sample createChildSecondElementOfClass: aClass [ | parser micDoc pillarDoc | @@ -31,7 +32,7 @@ MicMicrodownObjectToPillarObjectConverterTest >> parse: sample createChildSecond ^ pillarDoc ] -{ #category : #parsing } +{ #category : 'parsing' } MicMicrodownObjectToPillarObjectConverterTest >> parse: sample createElementOfClass: aClass [ | parser micDoc pillarDoc | @@ -42,44 +43,44 @@ MicMicrodownObjectToPillarObjectConverterTest >> parse: sample createElementOfCl ^ pillarDoc ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> parserClass [ ^ Microdown ] -{ #category : #running } +{ #category : 'running' } MicMicrodownObjectToPillarObjectConverterTest >> setUp [ super setUp. visitor := MicMicrodownObjectToPillarObjectConverter new. factory := MicMicrodownSnippetFactory new. ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testAnchorBlock [ self parse: factory anchorSample createElementOfClass: PRAnchor ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testAnchorReference [ self parse: factory anchorReferenceSample createChildElementOfClass: PRInternalLink ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testAnnotated [ self parse: factory annotatedSample createElementOfClass: PRAnnotatedParagraph ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testAnnotation [ self parse: factory annotationSample createChildSecondElementOfClass: PRUndefinedAnnotation ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testBoldFormat [ self parse: factory boldFormatSample createChildElementOfClass: PRBoldFormat ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testBoldFormatEmpty [ | boldBlock | self skip. @@ -89,13 +90,13 @@ MicMicrodownObjectToPillarObjectConverterTest >> testBoldFormatEmpty [ self assert: boldBlock text equals: '' ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testCodeBlock [ self parse: (factory codeblock: 'language=pharo' body: '1-2 ') createElementOfClass: PRCodeblock ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testCodeInText [ | document | @@ -107,87 +108,87 @@ MicMicrodownObjectToPillarObjectConverterTest >> testCodeInText [ ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testComment [ self parse: factory commentSample createElementOfClass: PRCommentedLine ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testEnvironmentBlock [ self parse: factory environmentSample createElementOfClass: PREnvironment ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testFigure [ self parse: factory figureSample createChildElementOfClass: PRFigure ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testHeader [ self parse: factory headerLevel3Sample createElementOfClass: PRHeader ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testHorizontalLineBlock [ self parse: factory horizontalLineSample createElementOfClass: PRHorizontalRule ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testItalicFormat [ self parse: factory italicFormatSample createChildElementOfClass: PRItalicFormat ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testItalicFormatEmpty [ | italicBlock | italicBlock := self parse: factory italicFormatEmptySample createChildElementOfClass: PRItalicFormat. self assert: italicBlock text equals: '' ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testLink [ self parse: factory linkSample createChildElementOfClass: PRExternalLink ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testListItem [ self parse: factory listMultiSample createChildElementOfClass: PRListItem ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testMathBlock [ self parse: factory mathParametersSample createElementOfClass: PRMathEnvironment ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testMathInline [ self parse: factory mathInlineSample createChildElementOfClass: PRMathInTextAnnotation ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testMetaDataBlock [ self parse: factory metaDataSample createElementOfClass: PRMetadata ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testMonospaceFormat [ self parse: factory monospaceFormatSample createChildElementOfClass: PRMonospaceFormat ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testMonospaceFormatEmpty [ | monospaceBloc | monospaceBloc := self parse: factory monospaceFormatEmptySample createChildElementOfClass: PRMonospaceFormat. self assert: monospaceBloc text equals: '' ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testNumberedList [ | document | document := (self parserClass new @@ -202,7 +203,7 @@ MicMicrodownObjectToPillarObjectConverterTest >> testNumberedList [ equals: PRListItem ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testQuoteBlock [ | source root pillarNode | source := '> text1 @@ -218,7 +219,7 @@ MicMicrodownObjectToPillarObjectConverterTest >> testQuoteBlock [ text2' ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testRawFormat [ self skip. self flag: #fixme. @@ -226,7 +227,7 @@ MicMicrodownObjectToPillarObjectConverterTest >> testRawFormat [ self parse: factory rawFormatSample createChildSecondElementOfClass: PRRaw ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testRoot [ | source root pillar | source := '#### Level four @@ -238,7 +239,7 @@ MicMicrodownObjectToPillarObjectConverterTest >> testRoot [ self assert: pillar children first level equals: 4 ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testSingleLevelOrderedList2 [ | source root list | source := '19. item 1 @@ -256,7 +257,7 @@ expanded'. self assert: list counter equals: 19 ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testSingleLevelUnorderedList2 [ | source root list item | source := '- item 1 @@ -275,7 +276,7 @@ MicMicrodownObjectToPillarObjectConverterTest >> testSingleLevelUnorderedList2 [ expanded' ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testSingleParagraphWithIndentedText [ | source root expected pillar | source := 'This is @@ -291,31 +292,31 @@ and one with tabs'. self assert: pillar children first text equals: expected ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testStrikethroughFormat [ self parse: factory strikethroughFormatSample createChildElementOfClass: PRStrikethroughFormat ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testStrikethroughFormatEmpty [ | strikeBlock | strikeBlock := self parse: factory strikethroughFormatEmptySample createChildElementOfClass: PRStrikethroughFormat. self assert: strikeBlock text equals: '' ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testTableBlock [ self parse: factory simpleTable createElementOfClass: PRTable ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testTableFormatBlock [ self parse: factory simpleTableMoreFormat createElementOfClass: PRTable ] -{ #category : #'tests-inline blocks' } +{ #category : 'tests-inline blocks' } MicMicrodownObjectToPillarObjectConverterTest >> testText [ | source root pillar | source := 'Foo'. @@ -324,7 +325,7 @@ MicMicrodownObjectToPillarObjectConverterTest >> testText [ self assert: pillar class equals: PRText ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownObjectToPillarObjectConverterTest >> testTwoLevelUnorderedList1 [ | source root list secondItem subItem | source := '- item 1 diff --git a/src/Microdown-Pillar-Tests/MicOrderedListBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicOrderedListBlockTest.extension.st index 65d03a8a..fca6013a 100644 --- a/src/Microdown-Pillar-Tests/MicOrderedListBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicOrderedListBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicOrderedListBlockTest } +Extension { #name : 'MicOrderedListBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicOrderedListBlockTest >> testSingleLevelList2asPillar [ | source root list | source := '19. item 1 diff --git a/src/Microdown-Pillar-Tests/MicParagraphBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicParagraphBlockTest.extension.st index 1ce36dec..51e24483 100644 --- a/src/Microdown-Pillar-Tests/MicParagraphBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicParagraphBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicParagraphBlockTest } +Extension { #name : 'MicParagraphBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicParagraphBlockTest >> testSingleParagraphWithFormat [ | source root pillar | source := 'This **paragraph** with spaces'. @@ -16,7 +16,7 @@ MicParagraphBlockTest >> testSingleParagraphWithFormat [ ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicParagraphBlockTest >> testSingleParagraphWithIndentedTextAsPillar [ | source root expected pillar | source := 'This is diff --git a/src/Microdown-Pillar-Tests/MicQuoteBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicQuoteBlockTest.extension.st index 7698414c..c276187f 100644 --- a/src/Microdown-Pillar-Tests/MicQuoteBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicQuoteBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicQuoteBlockTest } +Extension { #name : 'MicQuoteBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicQuoteBlockTest >> testQuoteBlockAsPilar [ | source root pillarNode | source := '> text1 diff --git a/src/Microdown-Pillar-Tests/MicRawBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicRawBlockTest.extension.st index 11f4a57a..feda1b1d 100644 --- a/src/Microdown-Pillar-Tests/MicRawBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicRawBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicRawBlockTest } +Extension { #name : 'MicRawBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicRawBlockTest >> testRawAsBackslash [ "backslash should not be expanded in raw" | source rawBlock pillar | @@ -11,7 +11,7 @@ MicRawBlockTest >> testRawAsBackslash [ self assert: pillar text equals: ' aRaw\Text ' ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicRawBlockTest >> testRawAsPillar [ | source rawBlock pillar | source := 'bla {{ aRawText }} bla'. diff --git a/src/Microdown-Pillar-Tests/MicRootBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicRootBlockTest.extension.st index e757759a..ba3d21ef 100644 --- a/src/Microdown-Pillar-Tests/MicRootBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicRootBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicRootBlockTest } +Extension { #name : 'MicRootBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicRootBlockTest >> testRootAsPillar [ | source root pillar | source := '#### Level four diff --git a/src/Microdown-Pillar-Tests/MicTextualMicrodownToPillarTest.class.st b/src/Microdown-Pillar-Tests/MicTextualMicrodownToPillarTest.class.st index 530971de..fb234db9 100644 --- a/src/Microdown-Pillar-Tests/MicTextualMicrodownToPillarTest.class.st +++ b/src/Microdown-Pillar-Tests/MicTextualMicrodownToPillarTest.class.st @@ -8,48 +8,49 @@ Te tests are just checking that object of the correct class is created. Future extensions should handle the details. " Class { - #name : #MicTextualMicrodownToPillarTest, - #superclass : #TestCase, + #name : 'MicTextualMicrodownToPillarTest', + #superclass : 'TestCase', #instVars : [ 'factory' ], - #category : #'Microdown-Pillar-Tests' + #category : 'Microdown-Pillar-Tests', + #package : 'Microdown-Pillar-Tests' } -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicTextualMicrodownToPillarTest >> anchorClass [ ^ PRAnchor ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> codeBlockClass [ ^ PRCodeblock ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownToPillarTest >> factory [ ^ factory ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownToPillarTest >> factory: aFactory [ factory := aFactory ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> headerClass [ ^ PRHeader ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> orderedListClass [ ^ PROrderedList ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownToPillarTest >> parse: sample createChildElementOfClass: aClass [ | parser micDoc pillarDoc | @@ -60,7 +61,7 @@ MicTextualMicrodownToPillarTest >> parse: sample createChildElementOfClass: aCla ^ pillarDoc children first children first ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownToPillarTest >> parse: sample createElementOfClass: aClass [ | parser micDoc pillarDoc | @@ -70,7 +71,7 @@ MicTextualMicrodownToPillarTest >> parse: sample createElementOfClass: aClass [ self assert: pillarDoc children first class equals: aClass. ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownToPillarTest >> parseCreateDocument: sample [ | parser micDoc pillarDoc | @@ -80,49 +81,49 @@ MicTextualMicrodownToPillarTest >> parseCreateDocument: sample [ self assert: pillarDoc class equals: PRDocument. ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownToPillarTest >> parserClass [ ^ Microdown ] -{ #category : #'tests - document' } +{ #category : 'tests - document' } MicTextualMicrodownToPillarTest >> rootBlockClass [ ^ PRDocument ] -{ #category : #running } +{ #category : 'running' } MicTextualMicrodownToPillarTest >> setUp [ super setUp. self factory: MicMicrodownSnippetFactory new. ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicTextualMicrodownToPillarTest >> testAnchor [ self parse: factory anchorSample createElementOfClass: self anchorClass ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicTextualMicrodownToPillarTest >> testAnchorAreTrimed [ self parse: factory anchorAreTrimedSample createElementOfClass: self anchorClass ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicTextualMicrodownToPillarTest >> testAnchorWithNewLine [ self parse: factory anchorWithNewLineSample createElementOfClass: self anchorClass ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicTextualMicrodownToPillarTest >> testAnchorWithSpaceInside [ self parse: factory anchorWithSpaceInsideSample createElementOfClass: self anchorClass ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicTextualMicrodownToPillarTest >> testBoldFormat [ self parse: factory boldFormatSample createChildElementOfClass: PRBoldFormat ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicTextualMicrodownToPillarTest >> testBoldFormatEmpty [ | boldBlock | self skip. @@ -131,208 +132,208 @@ MicTextualMicrodownToPillarTest >> testBoldFormatEmpty [ self assert: boldBlock text equals: '' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> testHeaderEmpty [ self parse: factory headerEmptySample createElementOfClass: self headerClass ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> testHeaderLevel1 [ self parse: factory headerLevel1Sample createElementOfClass: self headerClass ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> testHeaderLevel2 [ self parse: factory headerLevel2Sample createElementOfClass: self headerClass ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> testHeaderLevel3 [ self parse: factory headerLevel3Sample createElementOfClass: self headerClass ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> testHeaderLevel4 [ self parse: factory headerLevel4Sample createElementOfClass: self headerClass ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> testHeaderLevel5 [ self parse: factory headerLevel5Sample createElementOfClass: self headerClass ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> testHeaderWithFormat [ self parse: factory headerWithFormatSample createElementOfClass: self headerClass ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicTextualMicrodownToPillarTest >> testHeaderWithNewLine [ self parse: factory headerWithNewLineSample createElementOfClass: self headerClass ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicTextualMicrodownToPillarTest >> testItalicFormat [ self parse: factory italicFormatSample createChildElementOfClass: PRItalicFormat ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicTextualMicrodownToPillarTest >> testItalicFormatEmpty [ | italicBlock | italicBlock := self parse: factory italicFormatEmptySample createChildElementOfClass: PRItalicFormat. self assert: italicBlock text equals: '' ] -{ #category : #'tests - document' } +{ #category : 'tests - document' } MicTextualMicrodownToPillarTest >> testLineEnd [ self parseCreateDocument: factory lineEndSample ] -{ #category : #'tests - document' } +{ #category : 'tests - document' } MicTextualMicrodownToPillarTest >> testLineEndwithNewline [ self parseCreateDocument: factory lineEndwithNewlineSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testListMulti [ self parse: factory listMultiSample createElementOfClass: self unorderedListClass ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testListWithComment [ self parse: factory listWithCommentSample createElementOfClass: self orderedListClass ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicTextualMicrodownToPillarTest >> testMonospaceFormat [ self parse: factory monospaceFormatSample createChildElementOfClass: PRMonospaceFormat ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicTextualMicrodownToPillarTest >> testMonospaceFormatEmpty [ | monospaceBloc | monospaceBloc := self parse: factory monospaceFormatEmptySample createChildElementOfClass: PRMonospaceFormat. self assert: monospaceBloc text equals: '' ] -{ #category : #'tests - document' } +{ #category : 'tests - document' } MicTextualMicrodownToPillarTest >> testNewline [ self parseCreateDocument: factory newlineSample ] -{ #category : #'tests - document' } +{ #category : 'tests - document' } MicTextualMicrodownToPillarTest >> testNewlineCR [ self parseCreateDocument: factory newlineCRSample ] -{ #category : #'tests - document' } +{ #category : 'tests - document' } MicTextualMicrodownToPillarTest >> testNewlineCRLF [ self parseCreateDocument: factory newlineCRLFSample ] -{ #category : #'tests - document' } +{ #category : 'tests - document' } MicTextualMicrodownToPillarTest >> testNewlineLF [ self parseCreateDocument: factory newlineLFSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testOrderedList [ self parse: factory orderedListSample createElementOfClass: self orderedListClass ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testOrderedListEmpty [ self parse: factory orderedListEmptySample createElementOfClass: self orderedListClass ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testOrderedListWithTwoItems [ self parse: factory orderedListWithTwoItemsSample createElementOfClass: self orderedListClass ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> testScript [ self parse: factory blockSampleOnMultipleLines createElementOfClass: self codeBlockClass ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> testScriptParameterTrueByDefault [ self parse: factory blockWithParameterTrueByDefaultSample createElementOfClass: self codeBlockClass ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> testScriptParameterWithFloat [ self parse: factory blockWithParameterWithFloatSample createElementOfClass: self codeBlockClass ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> testScriptParameterWithNoValues [ self parse: factory blockWithParameterWithNoValuesSample createElementOfClass: self codeBlockClass ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> testScriptWithLanguage [ self parse: factory blockWithLanguageSample createElementOfClass: self codeBlockClass ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> testScriptWithNewLine [ self parse: factory blockWithNewLineSample createElementOfClass: self codeBlockClass ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> testScriptWithSpaceAtTheEnd [ self parse: factory blockWithSpaceAtTheEndSample createElementOfClass: self codeBlockClass ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicTextualMicrodownToPillarTest >> testScriptWithSpacedParameters [ self parse: factory blockWithSpacedParametersSample createElementOfClass: self codeBlockClass ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicTextualMicrodownToPillarTest >> testStrikethroughFormat [ self parse: factory strikethroughFormatSample createChildElementOfClass: PRStrikethroughFormat ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicTextualMicrodownToPillarTest >> testStrikethroughFormatEmpty [ | strikeBlock | strikeBlock := self parse: factory strikethroughFormatEmptySample createChildElementOfClass: PRStrikethroughFormat. self assert: strikeBlock text equals: '' ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testUnorderedList [ self parse: factory unorderedListSample createElementOfClass: self unorderedListClass ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testUnorderedListEmpty [ self parse: factory unorderedListEmptySample createElementOfClass: self unorderedListClass ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testUnorderedListWithSubList [ self parse: factory unorderedListWithSubListSample createElementOfClass: self unorderedListClass ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> testUnorderedListWithTwoItems [ self parse: factory unorderedListWithTwoItemsSample createElementOfClass: self unorderedListClass ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownToPillarTest >> unorderedListClass [ ^ PRUnorderedList diff --git a/src/Microdown-Pillar-Tests/MicToPillarBasicTest.class.st b/src/Microdown-Pillar-Tests/MicToPillarBasicTest.class.st index 01bc7964..5cd86c24 100644 --- a/src/Microdown-Pillar-Tests/MicToPillarBasicTest.class.st +++ b/src/Microdown-Pillar-Tests/MicToPillarBasicTest.class.st @@ -1,18 +1,19 @@ Class { - #name : #MicToPillarBasicTest, - #superclass : #TestCase, + #name : 'MicToPillarBasicTest', + #superclass : 'TestCase', #instVars : [ 'pillarDocument' ], - #category : #'Microdown-Pillar-Tests' + #category : 'Microdown-Pillar-Tests', + #package : 'Microdown-Pillar-Tests' } -{ #category : #tests } +{ #category : 'tests' } MicToPillarBasicTest >> parserClass [ ^ Microdown ] -{ #category : #tests } +{ #category : 'tests' } MicToPillarBasicTest >> testCodeBlock [ | document | @@ -23,7 +24,7 @@ MicToPillarBasicTest >> testCodeBlock [ ] -{ #category : #tests } +{ #category : 'tests' } MicToPillarBasicTest >> testCodeInText [ | document | @@ -35,7 +36,7 @@ MicToPillarBasicTest >> testCodeInText [ ] -{ #category : #tests } +{ #category : 'tests' } MicToPillarBasicTest >> testHeader [ | document | @@ -52,7 +53,7 @@ MicToPillarBasicTest >> testHeader [ ] -{ #category : #tests } +{ #category : 'tests' } MicToPillarBasicTest >> testNumberedList [ | document | document := (self parserClass new diff --git a/src/Microdown-Pillar-Tests/MicUnorderedListBlockTest.extension.st b/src/Microdown-Pillar-Tests/MicUnorderedListBlockTest.extension.st index 1f01849c..ed8b7fdf 100644 --- a/src/Microdown-Pillar-Tests/MicUnorderedListBlockTest.extension.st +++ b/src/Microdown-Pillar-Tests/MicUnorderedListBlockTest.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicUnorderedListBlockTest } +Extension { #name : 'MicUnorderedListBlockTest' } -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicUnorderedListBlockTest >> testSingleLevelList2asPillar [ | source root list item | source := '- item 1 @@ -19,7 +19,7 @@ MicUnorderedListBlockTest >> testSingleLevelList2asPillar [ expanded' ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicUnorderedListBlockTest >> testSingleLevelList2asPillarWithFormatting [ | source root prlist item | source := '- **item 1** expanded @@ -41,7 +41,7 @@ MicUnorderedListBlockTest >> testSingleLevelList2asPillarWithFormatting [ ' expanded'. ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicUnorderedListBlockTest >> testTwoLevelList1AsPillar [ | source root list secondItem subItem | source := '- item 1 @@ -60,7 +60,7 @@ MicUnorderedListBlockTest >> testTwoLevelList1AsPillar [ equals: 'sublevel' "item 1" "unorded list" "sub item" ] -{ #category : #'*Microdown-Pillar-Tests' } +{ #category : '*Microdown-Pillar-Tests' } MicUnorderedListBlockTest >> testTwoLevelList1AsPillarWithFormatting [ | source root list secondItem subItem | source := '- item 1 diff --git a/src/Microdown-Pillar-Tests/package.st b/src/Microdown-Pillar-Tests/package.st index cb12af5e..c3c84cf8 100644 --- a/src/Microdown-Pillar-Tests/package.st +++ b/src/Microdown-Pillar-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Pillar-Tests' } +Package { #name : 'Microdown-Pillar-Tests' } diff --git a/src/Microdown-Pillar/ManifestMicrodownPillar.class.st b/src/Microdown-Pillar/ManifestMicrodownPillar.class.st index c7774c4c..bcb35b9c 100644 --- a/src/Microdown-Pillar/ManifestMicrodownPillar.class.st +++ b/src/Microdown-Pillar/ManifestMicrodownPillar.class.st @@ -4,7 +4,9 @@ I'm extending the microdown object model to support the generation of Pillar ele My main method is `asPillar`. " Class { - #name : #ManifestMicrodownPillar, - #superclass : #PackageManifest, - #category : #'Microdown-Pillar-Manifest' + #name : 'ManifestMicrodownPillar', + #superclass : 'PackageManifest', + #category : 'Microdown-Pillar-Manifest', + #package : 'Microdown-Pillar', + #tag : 'Manifest' } diff --git a/src/Microdown-Pillar/MicAbstractBlock.extension.st b/src/Microdown-Pillar/MicAbstractBlock.extension.st index dfc228f0..dc2c088b 100644 --- a/src/Microdown-Pillar/MicAbstractBlock.extension.st +++ b/src/Microdown-Pillar/MicAbstractBlock.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #MicAbstractBlock } +Extension { #name : 'MicAbstractBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicAbstractBlock >> pillarFrom: aCollectionOfMicElements [ ^ aCollectionOfMicElements collect: [ :e | e accept: MicMicrodownObjectToPillarObjectConverter new ] ] -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicAbstractBlock >> pillarFromString: aString [ ^ MicInlineParser new pillarFrom: aString diff --git a/src/Microdown-Pillar/MicAnchorReferenceBlock.extension.st b/src/Microdown-Pillar/MicAnchorReferenceBlock.extension.st index 51e0bd5b..6057336c 100644 --- a/src/Microdown-Pillar/MicAnchorReferenceBlock.extension.st +++ b/src/Microdown-Pillar/MicAnchorReferenceBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicAnchorReferenceBlock } +Extension { #name : 'MicAnchorReferenceBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicAnchorReferenceBlock >> associatedPillarClass [ ^ PRInternalLink ] diff --git a/src/Microdown-Pillar/MicAnnotationBlock.extension.st b/src/Microdown-Pillar/MicAnnotationBlock.extension.st index dfe24c40..9bccd56c 100644 --- a/src/Microdown-Pillar/MicAnnotationBlock.extension.st +++ b/src/Microdown-Pillar/MicAnnotationBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicAnnotationBlock } +Extension { #name : 'MicAnnotationBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicAnnotationBlock >> associatedPillarClass [ ^ PRAbstractAnnotation findClassAcceptingTag: self name ifNone: [ PRUndefinedAnnotation ] diff --git a/src/Microdown-Pillar/MicBoldFormatBlock.extension.st b/src/Microdown-Pillar/MicBoldFormatBlock.extension.st index 9b9535a9..839b36ce 100644 --- a/src/Microdown-Pillar/MicBoldFormatBlock.extension.st +++ b/src/Microdown-Pillar/MicBoldFormatBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicBoldFormatBlock } +Extension { #name : 'MicBoldFormatBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicBoldFormatBlock >> associatedPillarClass [ ^ PRBoldFormat ] diff --git a/src/Microdown-Pillar/MicElement.extension.st b/src/Microdown-Pillar/MicElement.extension.st index 130f0543..f7ef0e92 100644 --- a/src/Microdown-Pillar/MicElement.extension.st +++ b/src/Microdown-Pillar/MicElement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicElement } +Extension { #name : 'MicElement' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicElement >> asPillar [ ^ self accept: MicMicrodownObjectToPillarObjectConverter new diff --git a/src/Microdown-Pillar/MicFigureBlock.extension.st b/src/Microdown-Pillar/MicFigureBlock.extension.st index dae7e69f..717490a8 100644 --- a/src/Microdown-Pillar/MicFigureBlock.extension.st +++ b/src/Microdown-Pillar/MicFigureBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicFigureBlock } +Extension { #name : 'MicFigureBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicFigureBlock >> associatedPillarClass [ ^PRFigure ] diff --git a/src/Microdown-Pillar/MicInlineElement.extension.st b/src/Microdown-Pillar/MicInlineElement.extension.st index 7d1403c4..67f5b8f0 100644 --- a/src/Microdown-Pillar/MicInlineElement.extension.st +++ b/src/Microdown-Pillar/MicInlineElement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicInlineElement } +Extension { #name : 'MicInlineElement' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicInlineElement >> associatedPillarClass [ ^ self subclassResponsibility ] diff --git a/src/Microdown-Pillar/MicInlineParser.extension.st b/src/Microdown-Pillar/MicInlineParser.extension.st index a19adb34..b98e5882 100644 --- a/src/Microdown-Pillar/MicInlineParser.extension.st +++ b/src/Microdown-Pillar/MicInlineParser.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicInlineParser } +Extension { #name : 'MicInlineParser' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicInlineParser >> pillarFrom: aString [ "return a collection of pillar nodes which can be used in setChildren: of the owner of aString" diff --git a/src/Microdown-Pillar/MicItalicFormatBlock.extension.st b/src/Microdown-Pillar/MicItalicFormatBlock.extension.st index 09cb19f1..378551ce 100644 --- a/src/Microdown-Pillar/MicItalicFormatBlock.extension.st +++ b/src/Microdown-Pillar/MicItalicFormatBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicItalicFormatBlock } +Extension { #name : 'MicItalicFormatBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicItalicFormatBlock >> associatedPillarClass [ ^ PRItalicFormat ] diff --git a/src/Microdown-Pillar/MicLinkBlock.extension.st b/src/Microdown-Pillar/MicLinkBlock.extension.st index a6ec086e..08c0d828 100644 --- a/src/Microdown-Pillar/MicLinkBlock.extension.st +++ b/src/Microdown-Pillar/MicLinkBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicLinkBlock } +Extension { #name : 'MicLinkBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicLinkBlock >> associatedPillarClass [ ^ PRExternalLink ] diff --git a/src/Microdown-Pillar/MicMathInlineBlock.extension.st b/src/Microdown-Pillar/MicMathInlineBlock.extension.st index 70b3d616..13a57bff 100644 --- a/src/Microdown-Pillar/MicMathInlineBlock.extension.st +++ b/src/Microdown-Pillar/MicMathInlineBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicMathInlineBlock } +Extension { #name : 'MicMathInlineBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicMathInlineBlock >> associatedPillarClass [ ^ PRMathInTextAnnotation ] diff --git a/src/Microdown-Pillar/MicMicrodownObjectToPillarObjectConverter.class.st b/src/Microdown-Pillar/MicMicrodownObjectToPillarObjectConverter.class.st index 3c67f0e0..d4c530ce 100644 --- a/src/Microdown-Pillar/MicMicrodownObjectToPillarObjectConverter.class.st +++ b/src/Microdown-Pillar/MicMicrodownObjectToPillarObjectConverter.class.st @@ -3,12 +3,14 @@ This visitor is about to disappeared. It was created just to make sure that we c Now this visitor is working on non expanded code blocks. " Class { - #name : #MicMicrodownObjectToPillarObjectConverter, - #superclass : #MicrodownVisitor, - #category : #'Microdown-Pillar-Visitor' + #name : 'MicMicrodownObjectToPillarObjectConverter', + #superclass : 'MicrodownVisitor', + #category : 'Microdown-Pillar-Visitor', + #package : 'Microdown-Pillar', + #tag : 'Visitor' } -{ #category : #formatting } +{ #category : 'formatting' } MicMicrodownObjectToPillarObjectConverter >> formatBlock: aMicFormatBlock [ | childrenAsPillar | childrenAsPillar := aMicFormatBlock isOnlyChild @@ -19,7 +21,7 @@ MicMicrodownObjectToPillarObjectConverter >> formatBlock: aMicFormatBlock [ yourself ] -{ #category : #formatting } +{ #category : 'formatting' } MicMicrodownObjectToPillarObjectConverter >> urlBlock: aMicUrlBlock [ | queries urlString | @@ -39,17 +41,17 @@ MicMicrodownObjectToPillarObjectConverter >> urlBlock: aMicUrlBlock [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitAnchor: aMicAnchorBlock [ ^ PRAnchor new name: aMicAnchorBlock label; yourself ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitAnchorReference: aMicAnchorReference [ ^ PRInternalLink new anchor: aMicAnchorReference substring; yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitAnnotated: aMicAnnotatedBlock [ ^ PRAnnotatedParagraph new annotation: aMicAnnotatedBlock label; @@ -57,17 +59,17 @@ MicMicrodownObjectToPillarObjectConverter >> visitAnnotated: aMicAnnotatedBlock yourself ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitAnnotation: aMicAnnotation [ ^ aMicAnnotation associatedPillarClass new parameters: aMicAnnotation arguments ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitBold: aMicBold [ ^ self formatBlock: aMicBold ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitCell: aCell [ | cell | cell := PRTableCell new. @@ -75,7 +77,7 @@ MicMicrodownObjectToPillarObjectConverter >> visitCell: aCell [ ^ cell ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitCode: aMicCodeBlock [ | prBlock par pillars | @@ -103,14 +105,14 @@ MicMicrodownObjectToPillarObjectConverter >> visitCode: aMicCodeBlock [ ^ prBlock ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitComment: aMicCommentBlock [ ^ PRCommentedLine new text: aMicCommentBlock text ; yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitEnvironment: aMicEnvironmentBlock [ | env | @@ -121,7 +123,7 @@ MicMicrodownObjectToPillarObjectConverter >> visitEnvironment: aMicEnvironmentBl ^ env ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitFigure: aMicFigureBlock [ | aPRFigure | @@ -132,7 +134,7 @@ MicMicrodownObjectToPillarObjectConverter >> visitFigure: aMicFigureBlock [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitFormatBlock: aMicFormatBlock [ | childrenAsPillar | childrenAsPillar := aMicFormatBlock isOnlyChild @@ -143,7 +145,7 @@ MicMicrodownObjectToPillarObjectConverter >> visitFormatBlock: aMicFormatBlock [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitHeader: aMicHeaderBlock [ ^ PRHeader new @@ -152,17 +154,17 @@ MicMicrodownObjectToPillarObjectConverter >> visitHeader: aMicHeaderBlock [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitHorizontalLine: anHorizontalLineBlock [ ^ PRHorizontalRule new ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitItalic: aMicItalic [ ^ self formatBlock: aMicItalic ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitLink: aMicLink [ ^ aMicLink associatedPillarClass new @@ -173,7 +175,7 @@ MicMicrodownObjectToPillarObjectConverter >> visitLink: aMicLink [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitListItem: aMicListItemBlock [ ^ PRListItem new @@ -183,7 +185,7 @@ MicMicrodownObjectToPillarObjectConverter >> visitListItem: aMicListItemBlock [ ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitMath: aMicMathBlock [ | captionElements | captionElements := aMicMathBlock arguments at: 'caption' ifAbsent: [ nil ]. @@ -195,23 +197,23 @@ MicMicrodownObjectToPillarObjectConverter >> visitMath: aMicMathBlock [ yourself ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitMathInline: aMicMathInline [ ^ self formatBlock: aMicMathInline ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitMetaData: aMicMetaData [ ^ PRMetadata new metadata: aMicMetaData body; yourself ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitMonospace: aMicMonospace [ ^ self formatBlock: aMicMonospace ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitOrderedList: aMicOrderedListBlock [ ^ PROrderedList new setChildren: (aMicOrderedListBlock children collect: [ :child | child accept: self ]); @@ -219,27 +221,27 @@ MicMicrodownObjectToPillarObjectConverter >> visitOrderedList: aMicOrderedListBl yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitParagraph: aMicParagraphBlock [ ^ PRParagraph new setChildren: (aMicParagraphBlock pillarFromString: aMicParagraphBlock text); yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitQuote: aMicQuoteBlock [ ^ PRPreformatted new setChildren: (aMicQuoteBlock pillarFromString: aMicQuoteBlock text); yourself ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitRaw: aMicRaw [ ^ PRRaw new text: aMicRaw substring ; yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitRoot: aMicRootBlock [ ^ PRDocument new setChildren: (aMicRootBlock children collect: [ :child | child accept: self ]); @@ -247,7 +249,7 @@ MicMicrodownObjectToPillarObjectConverter >> visitRoot: aMicRootBlock [ ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitRow: aRow in: aTable at: i [ | row | @@ -258,12 +260,12 @@ MicMicrodownObjectToPillarObjectConverter >> visitRow: aRow in: aTable at: i [ ^ row ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitStrike: aMicStrike [ ^ self formatBlock: aMicStrike ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitTable: aTable [ | table | table := PRTable new. @@ -272,13 +274,13 @@ MicMicrodownObjectToPillarObjectConverter >> visitTable: aTable [ ^ table ] -{ #category : #'visiting inline' } +{ #category : 'visiting inline' } MicMicrodownObjectToPillarObjectConverter >> visitText: aMicTextBlock [ ^ PRText new text: aMicTextBlock substring ; yourself ] -{ #category : #visiting } +{ #category : 'visiting' } MicMicrodownObjectToPillarObjectConverter >> visitUnorderedList: aMicUnorderedListBlock [ ^ PRUnorderedList new setChildren: (aMicUnorderedListBlock children collect:[:child| child accept: self]); diff --git a/src/Microdown-Pillar/MicMonospaceFormatBlock.extension.st b/src/Microdown-Pillar/MicMonospaceFormatBlock.extension.st index d61f4f59..a573750e 100644 --- a/src/Microdown-Pillar/MicMonospaceFormatBlock.extension.st +++ b/src/Microdown-Pillar/MicMonospaceFormatBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicMonospaceFormatBlock } +Extension { #name : 'MicMonospaceFormatBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicMonospaceFormatBlock >> associatedPillarClass [ ^ PRMonospaceFormat ] diff --git a/src/Microdown-Pillar/MicRawBlock.extension.st b/src/Microdown-Pillar/MicRawBlock.extension.st index aca2edcd..73dc8583 100644 --- a/src/Microdown-Pillar/MicRawBlock.extension.st +++ b/src/Microdown-Pillar/MicRawBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicRawBlock } +Extension { #name : 'MicRawBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicRawBlock >> associatedPillarClass [ ^ PRRaw ] diff --git a/src/Microdown-Pillar/MicStrikeFormatBlock.extension.st b/src/Microdown-Pillar/MicStrikeFormatBlock.extension.st index a816ff0c..34027a16 100644 --- a/src/Microdown-Pillar/MicStrikeFormatBlock.extension.st +++ b/src/Microdown-Pillar/MicStrikeFormatBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicStrikeFormatBlock } +Extension { #name : 'MicStrikeFormatBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicStrikeFormatBlock >> associatedPillarClass [ ^ PRStrikethroughFormat ] diff --git a/src/Microdown-Pillar/MicTextBlock.extension.st b/src/Microdown-Pillar/MicTextBlock.extension.st index ca200376..98cb2805 100644 --- a/src/Microdown-Pillar/MicTextBlock.extension.st +++ b/src/Microdown-Pillar/MicTextBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicTextBlock } +Extension { #name : 'MicTextBlock' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } MicTextBlock >> associatedPillarClass [ "special case" ] diff --git a/src/Microdown-Pillar/Trait.extension.st b/src/Microdown-Pillar/Trait.extension.st index 1144a50b..4acae285 100644 --- a/src/Microdown-Pillar/Trait.extension.st +++ b/src/Microdown-Pillar/Trait.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Trait } +Extension { #name : 'Trait' } -{ #category : #'*Microdown-Pillar' } +{ #category : '*Microdown-Pillar' } Trait >> buildMicroDownUsing: aBuilder withComment: aString [ aBuilder diff --git a/src/Microdown-Pillar/package.st b/src/Microdown-Pillar/package.st index 839d45f0..0cc5b8de 100644 --- a/src/Microdown-Pillar/package.st +++ b/src/Microdown-Pillar/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Pillar' } +Package { #name : 'Microdown-Pillar' } diff --git a/src/Microdown-PrettyPrinter-Tests/MicDumperTest.class.st b/src/Microdown-PrettyPrinter-Tests/MicDumperTest.class.st index c15fe35e..b11450e6 100644 --- a/src/Microdown-PrettyPrinter-Tests/MicDumperTest.class.st +++ b/src/Microdown-PrettyPrinter-Tests/MicDumperTest.class.st @@ -1,15 +1,16 @@ Class { - #name : #MicDumperTest, - #superclass : #ParametrizedTestCase, + #name : 'MicDumperTest', + #superclass : 'ParametrizedTestCase', #instVars : [ 'factory', 'visitor', 'parser' ], - #category : #'Microdown-PrettyPrinter-Tests' + #category : 'Microdown-PrettyPrinter-Tests', + #package : 'Microdown-PrettyPrinter-Tests' } -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> parse: aString andCheckWeGet: anExpectedString [ | mic | @@ -18,7 +19,7 @@ MicDumperTest >> parse: aString andCheckWeGet: anExpectedString [ self assert: visitor contents equals: anExpectedString ] -{ #category : #running } +{ #category : 'running' } MicDumperTest >> setUp [ super setUp. parser := Microdown new. @@ -26,7 +27,7 @@ MicDumperTest >> setUp [ visitor := MicRealDumper new. ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testAnchorFormat [ | micAnchor result | @@ -37,7 +38,7 @@ MicDumperTest >> testAnchorFormat [ equals: '(MicAnchorBlock new textElement: " test ")' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testBold [ self @@ -48,7 +49,7 @@ MicDumperTest >> testBold [ ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testBoldFormat [ | micBold | @@ -62,7 +63,7 @@ MicDumperTest >> testBoldFormat [ '(MicBoldFormatBlock new textElements: {(MicTextBlock new substring: ''Foo'')})' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockNewLine [ | micCodeBlock result | @@ -74,7 +75,7 @@ MicDumperTest >> testCodeBlockNewLine [ equals: '(MicCodeBlock new body: ''foo'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockOnMultipleLines [ | micCodeBlock result | @@ -88,7 +89,7 @@ second line third line **b**'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithCaption [ | micCodeBlock result | @@ -102,7 +103,7 @@ MicDumperTest >> testCodeBlockWithCaption [ '(MicCodeBlock new arguments: { #caption ->''Color is beautifull'' . #bar ->2 } asDictionary ; body: ''bla'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithFloatParam [ | micCodeBlock result | @@ -115,7 +116,7 @@ MicDumperTest >> testCodeBlockWithFloatParam [ equals: '(MicCodeBlock new arguments: { #ratio ->0.8 } asDictionary ; body: ''bar'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithLanguage [ | micCodeBlock result | @@ -128,7 +129,7 @@ MicDumperTest >> testCodeBlockWithLanguage [ '(MicCodeBlock new arguments: { #language ->smalltalk } asDictionary ; body: ''foo'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithLiteralArray [ | micCodeBlock result | @@ -142,7 +143,7 @@ MicDumperTest >> testCodeBlockWithLiteralArray [ '(MicCodeBlock new arguments: { #foo ->#(1 2 true) } asDictionary ; )' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithNoValues [ | micCodeBlock result | @@ -156,7 +157,7 @@ MicDumperTest >> testCodeBlockWithNoValues [ '(MicCodeBlock new arguments: { #foo -> } asDictionary ; body: ''bar'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithParameterTrueByDefault [ | micCodeBlock result | @@ -169,7 +170,7 @@ MicDumperTest >> testCodeBlockWithParameterTrueByDefault [ equals: '(MicCodeBlock new arguments: { #language ->foo } asDictionary ; body: ''bar'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithParameters [ | micCodeBlock result | @@ -182,7 +183,7 @@ MicDumperTest >> testCodeBlockWithParameters [ '(MicCodeBlock new arguments: { #foo ->true . #bar ->2 } asDictionary ; body: ''bla'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithSpaceAtTheEnd [ | micCodeBlock result | @@ -195,7 +196,7 @@ MicDumperTest >> testCodeBlockWithSpaceAtTheEnd [ '(MicCodeBlock new body: ''foo'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithSpacedParameters [ | micCodeBlock result | @@ -209,7 +210,7 @@ MicDumperTest >> testCodeBlockWithSpacedParameters [ '(MicCodeBlock new arguments: { #foo -> true . #bar -> 2 } asDictionary ; body: ''bla'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testCodeBlockWithoutParam [ | micCodeBlock result | @@ -223,7 +224,7 @@ second line third line **b**'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testComment [ | micComment | @@ -236,7 +237,7 @@ MicDumperTest >> testComment [ equals: '(MicCommentBlock new textElement: ''Foo'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testFigureBoldFormat [ | micFigure result | @@ -250,7 +251,7 @@ MicDumperTest >> testFigureBoldFormat [ ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testFigureBoldFormat2 [ | micFigure result | @@ -264,7 +265,7 @@ MicDumperTest >> testFigureBoldFormat2 [ '(MicFigureBlock new arguments: { #label ->figureTest . #size ->80 } asDictionary ; url: ''/anUrl'' ; caption: { (MicBoldFormatBlock new textElements: {(MicTextBlock new substring: ''Bold'')}) . (MicTextBlock new substring: '' and not bold and '') . (MicBoldFormatBlock new textElements: {(MicTextBlock new substring: ''bold'')})}; yourself)' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testFigureFormat [ | micFigure result | @@ -278,7 +279,7 @@ MicDumperTest >> testFigureFormat [ '(MicFigureBlock new arguments: { #label ->figureTest . #width ->80 } asDictionary ; url: ''/anUrl'' ; caption: { (MicTextBlock new substring: ''Foo'')}; yourself)' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testFigureItalicFormat [ | micFigure result | @@ -292,7 +293,7 @@ MicDumperTest >> testFigureItalicFormat [ '(MicFigureBlock new arguments: { #label ->figureTest . #width ->80 } asDictionary ; url: ''/anUrl'' ; caption: { (MicItalicFormatBlock new textElements: {(MicTextBlock new substring: ''Foo'')})}; yourself)' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testFigureMonospaceFormat [ | micFigure result | @@ -306,7 +307,7 @@ MicDumperTest >> testFigureMonospaceFormat [ '(MicFigureBlock new arguments: { #label ->figureTest . #width ->80 } asDictionary ; url: ''/anUrl'' ; caption: { (MicMonospaceFormatBlock new textElement: (MicTextBlock new substring: ''Foo''))}; yourself)' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testFigureNestedFormat [ | micFigure result | @@ -320,7 +321,7 @@ MicDumperTest >> testFigureNestedFormat [ '(MicFigureBlock new arguments: { #label ->figureTest . #width ->80 } asDictionary ; url: ''/anUrl'' ; caption: { (MicBoldFormatBlock new textElements: {(MicTextBlock new substring: ''Foo_'')})}; yourself)' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testFigureStrikeFormat [ | micFigure result | @@ -334,7 +335,7 @@ MicDumperTest >> testFigureStrikeFormat [ '(MicFigureBlock new arguments: { #label ->figureTest . #width ->80 } asDictionary ; url: ''/anUrl'' ; caption: { (MicStrikeFormatBlock new textElements: {(MicTextBlock new substring: ''Foo'')})}; yourself)' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testFileFigureFormat [ | micFigure result | @@ -348,7 +349,7 @@ MicDumperTest >> testFileFigureFormat [ '(MicFigureBlock new arguments: { #label ->figureTest . #width ->80 } asDictionary ; url: ''image.png/'' ; caption: { (MicTextBlock new substring: ''Foo'')}; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testHeader [ | micHeader | @@ -363,7 +364,7 @@ MicDumperTest >> testHeader [ '(MicHeaderBlock new level: 3; headerElements: {(MicTextBlock new substring: ''Foo'')})' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testItalicFormat [ | micItalic result | @@ -375,7 +376,7 @@ MicDumperTest >> testItalicFormat [ equals: '(MicItalicFormatBlock new textElements: {(MicTextBlock new substring: ''Foo'')})' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testMonospaceFormat [ | mic result | @@ -386,7 +387,7 @@ MicDumperTest >> testMonospaceFormat [ equals: '(MicMonospaceFormatBlock new textElement: (MicTextBlock new substring: ''Foo''))' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testOrderedList [ | micList | @@ -400,7 +401,7 @@ MicDumperTest >> testOrderedList [ '(MicOrderedListBlock new children: { (MicListItemBlock new (MicTextBlock new substring: ''Foo'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testOrderedListWithTwoItems [ | micList | @@ -414,7 +415,7 @@ MicDumperTest >> testOrderedListWithTwoItems [ '(MicOrderedListBlock new children: { (MicListItemBlock new (MicTextBlock new substring: ''first'')) . (MicListItemBlock new (MicTextBlock new substring: ''second'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testOrderedListWithTwoItemsBold [ | micList | @@ -428,7 +429,7 @@ MicDumperTest >> testOrderedListWithTwoItemsBold [ '(MicOrderedListBlock new children: { (MicListItemBlock new (MicBoldFormatBlock new textElements: {(MicTextBlock new substring: ''first'')})) . (MicListItemBlock new (MicTextBlock new substring: ''second'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testOrderedListWithTwoItemsItalic [ | micList | @@ -443,7 +444,7 @@ MicDumperTest >> testOrderedListWithTwoItemsItalic [ '(MicOrderedListBlock new children: { (MicListItemBlock new (MicItalicFormatBlock new textElements: {(MicTextBlock new substring: ''first'')})) . (MicListItemBlock new (MicTextBlock new substring: ''second'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testOrderedListWithTwoItemsMonospace [ | micList | @@ -457,7 +458,7 @@ MicDumperTest >> testOrderedListWithTwoItemsMonospace [ '(MicOrderedListBlock new children: { (MicListItemBlock new (MicMonospaceFormatBlock new textElement: (MicTextBlock new substring: ''first''))) . (MicListItemBlock new (MicTextBlock new substring: ''second'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testOrderedListWithTwoItemsStrike [ | micList | @@ -471,7 +472,7 @@ MicDumperTest >> testOrderedListWithTwoItemsStrike [ '(MicOrderedListBlock new children: { (MicListItemBlock new (MicStrikeFormatBlock new textElements: {(MicTextBlock new substring: ''first'')})) . (MicListItemBlock new (MicTextBlock new substring: ''second'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testParagraph [ | resString | @@ -479,7 +480,7 @@ MicDumperTest >> testParagraph [ self parse: factory paragraphSample andCheckWeGet: resString ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testPrintHeader [ | resString | @@ -492,7 +493,7 @@ MicDumperTest >> testPrintHeader [ ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testPrintOrderedList [ | resString | @@ -502,7 +503,7 @@ MicDumperTest >> testPrintOrderedList [ andCheckWeGet: resString ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testPrintParagraph [ | resString | @@ -510,7 +511,7 @@ MicDumperTest >> testPrintParagraph [ self parse: factory paragraphSample andCheckWeGet: resString ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testPrintUnorderedList [ | resString | @@ -518,7 +519,7 @@ MicDumperTest >> testPrintUnorderedList [ self parse: factory unorderedListSample andCheckWeGet: resString ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testQuote [ | micQuote | @@ -531,7 +532,7 @@ MicDumperTest >> testQuote [ '(MicQuoteBlock new textElement: (MicTextBlock new substring: ''Foo''))' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testRawBlock [ | micRaw | @@ -544,7 +545,7 @@ MicDumperTest >> testRawBlock [ '(MicRawBlock new substring: ''Foo'')' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testSimpleLinkFormat [ | micLink result | @@ -556,7 +557,7 @@ MicDumperTest >> testSimpleLinkFormat [ equals: '(MicLinkBlock new captionElements: {(MicTextBlock new substring: ''Pharo url'')} ; url: ''http://www.pharo.org'' ; yourself)' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testStrike [ @@ -567,7 +568,7 @@ MicDumperTest >> testStrike [ ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testTable [ | micTable | @@ -576,7 +577,7 @@ MicDumperTest >> testTable [ self assert: (micTable accept: visitor) equals: 'MicTableBlock' ] -{ #category : #'test - inline - blocks' } +{ #category : 'test - inline - blocks' } MicDumperTest >> testTextBlock [ | micText | @@ -589,7 +590,7 @@ MicDumperTest >> testTextBlock [ '(MicTextBlock new substring: ''Je ne connaitrais pas la peur'')' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testUnOrderedEmptyList [ | micList | @@ -603,7 +604,7 @@ MicDumperTest >> testUnOrderedEmptyList [ '(MicUnorderedListBlock new children: { (MicListItemBlock new (MicTextBlock new substring: ''-'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testUnOrderedList [ | micList | @@ -616,7 +617,7 @@ MicDumperTest >> testUnOrderedList [ '(MicUnorderedListBlock new children: { (MicListItemBlock new (MicTextBlock new substring: ''Foo'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testUnOrderedListWithTwoItems [ | micList | @@ -630,7 +631,7 @@ MicDumperTest >> testUnOrderedListWithTwoItems [ '(MicUnorderedListBlock new children: { (MicListItemBlock new (MicTextBlock new substring: ''Foo'')) . (MicListItemBlock new (MicTextBlock new substring: ''Bar'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testUnOrderedListWithTwoItemsBold [ | micList | @@ -644,7 +645,7 @@ MicDumperTest >> testUnOrderedListWithTwoItemsBold [ '(MicUnorderedListBlock new children: { (MicListItemBlock new (MicBoldFormatBlock new textElements: {(MicTextBlock new substring: ''Foo'')})) . (MicListItemBlock new (MicTextBlock new substring: ''Bar'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testUnOrderedListWithTwoItemsMonospace [ | micList | @@ -660,7 +661,7 @@ MicDumperTest >> testUnOrderedListWithTwoItemsMonospace [ '(MicUnorderedListBlock new children: { (MicListItemBlock new (MicMonospaceFormatBlock new textElement: (MicTextBlock new substring: ''Foo''))) . (MicListItemBlock new (MicTextBlock new substring: ''Bar'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testUnOrderedListWithTwoItemsNested [ | micList | @@ -676,7 +677,7 @@ MicDumperTest >> testUnOrderedListWithTwoItemsNested [ '(MicUnorderedListBlock new children: { (MicListItemBlock new (MicStrikeFormatBlock new textElements: {(MicItalicFormatBlock new textElements: {(MicTextBlock new substring: ''Foo'')})})) . (MicListItemBlock new (MicTextBlock new substring: ''Bar'')) }; yourself)' ] -{ #category : #'tests - section' } +{ #category : 'tests - section' } MicDumperTest >> testUnOrderedListWithTwoItemsStrike [ | micList | diff --git a/src/Microdown-PrettyPrinter-Tests/MicTextualMicrodownExporterTest.class.st b/src/Microdown-PrettyPrinter-Tests/MicTextualMicrodownExporterTest.class.st index 9765f94b..190fc8b4 100644 --- a/src/Microdown-PrettyPrinter-Tests/MicTextualMicrodownExporterTest.class.st +++ b/src/Microdown-PrettyPrinter-Tests/MicTextualMicrodownExporterTest.class.st @@ -1,6 +1,6 @@ Class { - #name : #MicTextualMicrodownExporterTest, - #superclass : #ParametrizedTestCase, + #name : 'MicTextualMicrodownExporterTest', + #superclass : 'ParametrizedTestCase', #instVars : [ 'factory', 'visitor', @@ -10,27 +10,28 @@ Class { #pools : [ 'MicroSharedPool' ], - #category : #'Microdown-PrettyPrinter-Tests' + #category : 'Microdown-PrettyPrinter-Tests', + #package : 'Microdown-PrettyPrinter-Tests' } -{ #category : #tests } +{ #category : 'tests' } MicTextualMicrodownExporterTest class >> testParameters [ ^ super testParameters addCase: { #visitorClass -> MicTextualMicrodownExporter }; yourself. ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownExporterTest >> factory [ ^ factory ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownExporterTest >> factory: aFactory [ factory := aFactory ] -{ #category : #running } +{ #category : 'running' } MicTextualMicrodownExporterTest >> setUp [ super setUp. factory := MicMicrodownSnippetFactory new. @@ -38,7 +39,7 @@ MicTextualMicrodownExporterTest >> setUp [ parser := Microdown new ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testAnchor [ | micAnchor | @@ -46,13 +47,13 @@ MicTextualMicrodownExporterTest >> testAnchor [ self assert: (visitor visit: micAnchor) first asString equals: AnchorMarkup ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testAnchorAutomatic [ self verifyObtain: factory anchorSample ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testAnchorReference [ "Pay attention an anchor reference is inside a paragraph and a paragraph emits a newline " @@ -65,25 +66,25 @@ MicTextualMicrodownExporterTest >> testAnchorReference [ ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testAnnotated [ self verifyObtain: factory annotatedSample ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testAnnotation [ self verifyObtain: factory annotationSample ] -{ #category : #'tests-codeblock' } +{ #category : 'tests-codeblock' } MicTextualMicrodownExporterTest >> testCodeBlock [ self verifyObtain: factory blockWithParametersSample, String cr ] -{ #category : #'tests-codeblock' } +{ #category : 'tests-codeblock' } MicTextualMicrodownExporterTest >> testCodeBlockNewLine [ | mic | @@ -97,25 +98,25 @@ this is a codeblock ' ] -{ #category : #'tests-codeblock' } +{ #category : 'tests-codeblock' } MicTextualMicrodownExporterTest >> testCodeBlockWithCaption [ self verifyObtain: factory blockWithParametersWithCaptionSample, String cr ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testComment [ self verifyObtain: factory commentSample ] -{ #category : #'tests - environment' } +{ #category : 'tests - environment' } MicTextualMicrodownExporterTest >> testEnvironment [ self verifyObtain: factory environmentSample ] -{ #category : #'tests - environment' } +{ #category : 'tests - environment' } MicTextualMicrodownExporterTest >> testEnvironmentWithInnerBlock [ self skip. @@ -124,13 +125,13 @@ MicTextualMicrodownExporterTest >> testEnvironmentWithInnerBlock [ self verifyObtain: factory environmentWithInnerBlockSample ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFigure [ self verifyObtain: factory figureSample ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFigureNewLine [ | mic | @@ -142,19 +143,19 @@ MicTextualMicrodownExporterTest >> testFigureNewLine [ ' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFigureWithBold [ self verifyObtain: factory figureBoldSample ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFigureWithItalic [ self verifyObtain: factory figureItalicSample ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFigureWithMicroDownMarkup [ | mic | @@ -166,31 +167,31 @@ MicTextualMicrodownExporterTest >> testFigureWithMicroDownMarkup [ ' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFigureWithMonospace [ self verifyObtain: factory figureMonospaceSample ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFigureWithNested [ self verifyObtain: factory figureNestedSample ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFigureWithStrike [ self verifyObtain: factory figureStrikeSample ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicTextualMicrodownExporterTest >> testFileFigure [ self verifyObtain: factory fileFigureSample ] -{ #category : #'tests-header' } +{ #category : 'tests-header' } MicTextualMicrodownExporterTest >> testHeaderNewLine [ | mic | @@ -203,13 +204,13 @@ MicTextualMicrodownExporterTest >> testHeaderNewLine [ ' ] -{ #category : #'tests-header' } +{ #category : 'tests-header' } MicTextualMicrodownExporterTest >> testHeaderWithBold [ self verifyObtain: factory headerWithFormatSampleWithNewLine ] -{ #category : #'tests-header' } +{ #category : 'tests-header' } MicTextualMicrodownExporterTest >> testHeaderWithMicroDownMarkup [ | mic | @@ -220,20 +221,20 @@ MicTextualMicrodownExporterTest >> testHeaderWithMicroDownMarkup [ ' ] -{ #category : #'tests-header' } +{ #category : 'tests-header' } MicTextualMicrodownExporterTest >> testHeaderWithNestedFormatSampleWithNewLine [ self verifyObtain: factory headerWithNestedFormatSampleWithNewLine. ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testHorizontalLine [ self verifyObtain: factory horizontalLineSample ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testInputfile [ | inputFile | @@ -241,25 +242,25 @@ MicTextualMicrodownExporterTest >> testInputfile [ self assert: inputFile children first path path equals: 'Chapters/text.md' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicTextualMicrodownExporterTest >> testLink [ self verifyObtain: factory linkSample ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicTextualMicrodownExporterTest >> testLinkWithBold [ self verifyObtain: factory linkBoldSample ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicTextualMicrodownExporterTest >> testLinkWithItalic [ self verifyObtain: factory linkItalicSample ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicTextualMicrodownExporterTest >> testLinkWithMicroDownMarkup [ | mic | @@ -270,43 +271,43 @@ MicTextualMicrodownExporterTest >> testLinkWithMicroDownMarkup [ ' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicTextualMicrodownExporterTest >> testLinkWithMonospace [ self verifyObtain: factory linkMonospaceSample ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicTextualMicrodownExporterTest >> testLinkWithNested [ self verifyObtain: factory linkNestedSample ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicTextualMicrodownExporterTest >> testLinkWithStrike [ self verifyObtain: factory linkStrikeSample ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicTextualMicrodownExporterTest >> testMathBlock [ self verifyObtain: factory mathParametersSample, String cr ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicTextualMicrodownExporterTest >> testMathBlockWithCaption [ self verifyObtain: factory mathParametersWithCaptionSample, String cr ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicTextualMicrodownExporterTest >> testMathInline [ self verifyObtain: factory mathInlineSample ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testMetaData [ self skip. self flag: #fixme. @@ -315,7 +316,7 @@ MicTextualMicrodownExporterTest >> testMetaData [ self verifyObtain: factory metaDataSample ] -{ #category : #'tests-header' } +{ #category : 'tests-header' } MicTextualMicrodownExporterTest >> testNestedHeader [ | header res | @@ -325,13 +326,13 @@ MicTextualMicrodownExporterTest >> testNestedHeader [ self assert: (res copyFrom: res size -3 to: res size - 2) equals: BoldMarkup ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testOrderedList [ self verifyObtain: factory orderedListWithTwoItemsSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testOrderedListNewLine [ | mic | @@ -343,43 +344,43 @@ MicTextualMicrodownExporterTest >> testOrderedListNewLine [ ' ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testOrderedListWithBold [ self verifyObtain: factory orderedListWithTwoItemsBoldSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testOrderedListWithItalic [ self verifyObtain: factory orderedListWithTwoItemsItalicSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testOrderedListWithMonospace [ self verifyObtain: factory orderedListWithTwoItemsMonospaceSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testOrderedListWithNested [ self verifyObtain: factory orderedListWithTwoItemsBoldFirstSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testOrderedListWithStrike [ self verifyObtain: factory orderedListWithTwoItemsStrikeSample ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicTextualMicrodownExporterTest >> testParagraph [ self verifyObtain: factory paragraphSample ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicTextualMicrodownExporterTest >> testParagraphNewLine [ | mic | @@ -389,19 +390,19 @@ blabla1 ' ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicTextualMicrodownExporterTest >> testParagraphWithBold [ self verifyObtain: factory paragraphBoldSample ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicTextualMicrodownExporterTest >> testParagraphWithItalic [ self verifyObtain: factory paragraphItalicSample ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicTextualMicrodownExporterTest >> testParagraphWithMicroDownMarkup [ | mic | @@ -411,79 +412,79 @@ blab\~l\**a*1 ' ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicTextualMicrodownExporterTest >> testParagraphWithMonospace [ self verifyObtain: factory paragraphMonospaceSample ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicTextualMicrodownExporterTest >> testParagraphWithNested [ self verifyObtain: factory paragraphNestedSample ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicTextualMicrodownExporterTest >> testParagraphWithStrike [ self verifyObtain: factory paragraphStrikeSample ] -{ #category : #'tests-header' } +{ #category : 'tests-header' } MicTextualMicrodownExporterTest >> testPlainHeader [ self verifyObtain: factory headerLevel3SampleWithNewLine ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testQuote [ self verifyObtain: factory quoteSample ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testRawFormat [ self verifyObtain: factory rawFormatSample ] -{ #category : #'tests-anchor' } +{ #category : 'tests-anchor' } MicTextualMicrodownExporterTest >> testRoot [ self verifyObtain: factory rootSample ] -{ #category : #tests } +{ #category : 'tests' } MicTextualMicrodownExporterTest >> testSimpleTable [ self verifyObtain: factory simpleTable ] -{ #category : #tests } +{ #category : 'tests' } MicTextualMicrodownExporterTest >> testSimpleTableWithFormatting [ self verifyObtain: factory simpleTableFormat ] -{ #category : #tests } +{ #category : 'tests' } MicTextualMicrodownExporterTest >> testSimpleTableWithFormattingWithShortRow [ self verifyObtain: factory simpleTableShortRow ] -{ #category : #tests } +{ #category : 'tests' } MicTextualMicrodownExporterTest >> testSimpleTableWithFormattingWithSomeElements [ self verifyObtain: factory simpleTableMoreFormat ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedList [ self verifyObtain: factory unorderedListWithTwoItemsSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedListNestedNewLine [ | mic | @@ -499,7 +500,7 @@ MicTextualMicrodownExporterTest >> testUnorderedListNestedNewLine [ ' ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedListNestedWithOrderedNewLine [ | mic | @@ -515,7 +516,7 @@ MicTextualMicrodownExporterTest >> testUnorderedListNestedWithOrderedNewLine [ ' ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedListNewLine [ | mic | @@ -527,37 +528,37 @@ MicTextualMicrodownExporterTest >> testUnorderedListNewLine [ ' ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedListWithBold [ self verifyObtain: factory unorderedListWithTwoItemsBoldSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedListWithItalic [ self verifyObtain: factory unorderedListWithTwoItemsItalicSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedListWithMonospace [ self verifyObtain: factory unorderedListWithTwoItemsMonospaceSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedListWithNested [ self verifyObtain: factory unorderedListWithTwoItemsNestedSample ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicTextualMicrodownExporterTest >> testUnorderedListWithStrike [ self verifyObtain: factory unorderedListWithTwoItemsStrikeSample ] -{ #category : #utilities } +{ #category : 'utilities' } MicTextualMicrodownExporterTest >> verifyObtain: aString [ | micElement | @@ -565,25 +566,25 @@ MicTextualMicrodownExporterTest >> verifyObtain: aString [ self assert: (visitor visit: micElement) equals: aString ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownExporterTest >> visitor [ ^ visitor ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownExporterTest >> visitor: anObject [ visitor := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownExporterTest >> visitorClass [ ^ visitorClass ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownExporterTest >> visitorClass: anObject [ visitorClass := anObject diff --git a/src/Microdown-PrettyPrinter-Tests/package.st b/src/Microdown-PrettyPrinter-Tests/package.st index 730198d1..faf53193 100644 --- a/src/Microdown-PrettyPrinter-Tests/package.st +++ b/src/Microdown-PrettyPrinter-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-PrettyPrinter-Tests' } +Package { #name : 'Microdown-PrettyPrinter-Tests' } diff --git a/src/Microdown-PrettyPrinter/MicRealDumper.class.st b/src/Microdown-PrettyPrinter/MicRealDumper.class.st index 2663421b..c7e18940 100644 --- a/src/Microdown-PrettyPrinter/MicRealDumper.class.st +++ b/src/Microdown-PrettyPrinter/MicRealDumper.class.st @@ -1,18 +1,19 @@ Class { - #name : #MicRealDumper, - #superclass : #MicrodownVisitor, + #name : 'MicRealDumper', + #superclass : 'MicrodownVisitor', #instVars : [ 'stream' ], - #category : #'Microdown-PrettyPrinter' + #category : 'Microdown-PrettyPrinter', + #package : 'Microdown-PrettyPrinter' } -{ #category : #accessing } +{ #category : 'accessing' } MicRealDumper >> contents [ ^ stream contents ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> element: anElement during: aBlock [ stream nextPut: $(. @@ -25,13 +26,13 @@ MicRealDumper >> element: anElement during: aBlock [ stream nextPut: $) ] -{ #category : #utilities } +{ #category : 'utilities' } MicRealDumper >> emitClassNameOf: aMicElement [ stream nextPutAll: aMicElement class asString ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> emitList: aList [ self @@ -44,7 +45,7 @@ MicRealDumper >> emitList: aList [ stream nextPutAll: ' }; yourself'] ] -{ #category : #build } +{ #category : 'build' } MicRealDumper >> emitParameters: aCodeBlock [ stream nextPutAll: 'arguments: { '. @@ -52,14 +53,14 @@ MicRealDumper >> emitParameters: aCodeBlock [ stream nextPutAll: ' } asDictionary ; ' ] -{ #category : #initialization } +{ #category : 'initialization' } MicRealDumper >> initialize [ super initialize. stream := MicOutputStream new setStream: (WriteStream on: (String new: 1000)). ] -{ #category : #build } +{ #category : 'build' } MicRealDumper >> parametersPrint: aDictionnary [ | lastKey | @@ -79,14 +80,14 @@ MicRealDumper >> parametersPrint: aDictionnary [ k = lastKey ifFalse: [ stream nextPutAll: ' . ' ] ] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicRealDumper >> visit: aMicElement [ aMicElement accept: self. stream contents ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitAnchor: aMicAnchor [ self @@ -99,7 +100,7 @@ MicRealDumper >> visitAnchor: aMicAnchor [ nextPutAll: ' "' ] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicRealDumper >> visitAttributedText: aMicBold [ self @@ -111,13 +112,13 @@ MicRealDumper >> visitAttributedText: aMicBold [ stream nextPutAll: '}' ] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicRealDumper >> visitBold: aMicItalic [ self visitAttributedText: aMicItalic ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitCode: aCodeBlock [ self @@ -132,7 +133,7 @@ MicRealDumper >> visitCode: aCodeBlock [ nextPutAll: '''' ]] ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitComment: aComment [ self flag: #argh. @@ -143,7 +144,7 @@ MicRealDumper >> visitComment: aComment [ stream nextPutAll: '''Foo''' ] ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitFigure: aMicFigure [ self flag: #arg. @@ -163,7 +164,7 @@ MicRealDumper >> visitFigure: aMicFigure [ stream nextPutAll: '}; yourself' ] ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitHeader: aHeader [ self @@ -178,13 +179,13 @@ MicRealDumper >> visitHeader: aHeader [ stream nextPut: $}] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicRealDumper >> visitItalic: aMicItalic [ self visitAttributedText: aMicItalic ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitLink: aMicLink [ self @@ -198,7 +199,7 @@ MicRealDumper >> visitLink: aMicLink [ stream nextPutAll: ' ; yourself' ] ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitListItem: anItem [ self flag: #arg. @@ -211,7 +212,7 @@ MicRealDumper >> visitListItem: anItem [ ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicRealDumper >> visitMonospace: aMonospace [ self @@ -222,13 +223,13 @@ MicRealDumper >> visitMonospace: aMonospace [ ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitOrderedList: anOrderedList [ self emitList: anOrderedList ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitParagraph: aParagraph [ stream nextPut: $(. @@ -245,7 +246,7 @@ MicRealDumper >> visitParagraph: aParagraph [ stream nextPut: $) ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitQuote: aQuote [ stream nextPut: $(. @@ -259,7 +260,7 @@ MicRealDumper >> visitQuote: aQuote [ stream nextPut: $) ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitRaw: aMicRaw [ self @@ -269,13 +270,13 @@ MicRealDumper >> visitRaw: aMicRaw [ ] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicRealDumper >> visitStrike: aMicItalic [ self visitAttributedText: aMicItalic ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitTable: aTable [ self flag: #arg. self @@ -285,7 +286,7 @@ MicRealDumper >> visitTable: aTable [ aTable children first accept: self ] ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitText: aText [ self @@ -298,7 +299,7 @@ MicRealDumper >> visitText: aText [ nextPutAll: '''' ] ] -{ #category : #'visit - section' } +{ #category : 'visit - section' } MicRealDumper >> visitUnorderedList: aUnOrderedList [ self emitList: aUnOrderedList diff --git a/src/Microdown-PrettyPrinter/MicTextualMicrodownExporter.class.st b/src/Microdown-PrettyPrinter/MicTextualMicrodownExporter.class.st index 0fc91eff..e3c39cbe 100644 --- a/src/Microdown-PrettyPrinter/MicTextualMicrodownExporter.class.st +++ b/src/Microdown-PrettyPrinter/MicTextualMicrodownExporter.class.st @@ -1,6 +1,6 @@ Class { - #name : #MicTextualMicrodownExporter, - #superclass : #MicrodownVisitor, + #name : 'MicTextualMicrodownExporter', + #superclass : 'MicrodownVisitor', #instVars : [ 'stream', 'builder', @@ -9,10 +9,11 @@ Class { #pools : [ 'MicroSharedPool' ], - #category : #'Microdown-PrettyPrinter' + #category : 'Microdown-PrettyPrinter', + #package : 'Microdown-PrettyPrinter' } -{ #category : #helpers } +{ #category : 'helpers' } MicTextualMicrodownExporter >> backSlashString: aString [ ^ String streamContents: [ :st | @@ -24,7 +25,7 @@ MicTextualMicrodownExporter >> backSlashString: aString [ st nextPutAll: each asString ]] ] -{ #category : #build } +{ #category : 'build' } MicTextualMicrodownExporter >> blockPrint: aMicText [ | text | @@ -33,7 +34,7 @@ MicTextualMicrodownExporter >> blockPrint: aMicText [ ^ text ] -{ #category : #API } +{ #category : 'API' } MicTextualMicrodownExporter >> buildRowHeader: row [ builder newLine. @@ -41,29 +42,29 @@ MicTextualMicrodownExporter >> buildRowHeader: row [ ^ builder raw: '|' ] -{ #category : #build } +{ #category : 'build' } MicTextualMicrodownExporter >> classPrint: aMicFigure [ ^ aMicFigure class asString ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownExporter >> contents [ ^ stream contents ] -{ #category : #io } +{ #category : 'io' } MicTextualMicrodownExporter >> folderName [ ^ 'mic' ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextualMicrodownExporter >> inList [ ^ inList ] -{ #category : #initialization } +{ #category : 'initialization' } MicTextualMicrodownExporter >> initialize [ super initialize. stream := (String new: 10000) writeStream. @@ -73,7 +74,7 @@ MicTextualMicrodownExporter >> initialize [ inList := false ] -{ #category : #build } +{ #category : 'build' } MicTextualMicrodownExporter >> parametersPrint: aDictionnary [ | text lastKey | @@ -87,38 +88,38 @@ MicTextualMicrodownExporter >> parametersPrint: aDictionnary [ ^ text ] -{ #category : #setting } +{ #category : 'setting' } MicTextualMicrodownExporter >> setFalseInList [ inList := false ] -{ #category : #setting } +{ #category : 'setting' } MicTextualMicrodownExporter >> setTrueInList [ inList := true ] -{ #category : #API } +{ #category : 'API' } MicTextualMicrodownExporter >> visit: aMicElement [ aMicElement accept: self. ^ stream contents ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitAnchor: anAnchor [ builder anchor: anAnchor label ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitAnchorReference: anAnchorReference [ builder anchorReference: anAnchorReference substring ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitAnnotated: anAnnotated [ builder @@ -126,24 +127,24 @@ MicTextualMicrodownExporter >> visitAnnotated: anAnnotated [ paragraph: [ super visitAnnotated: anAnnotated ] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitAnnotation: anAnnotation [ builder raw: anAnnotation printString ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitBold: aBoldFormat [ builder bold: [ super visitBold: aBoldFormat ] ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitChildrenWithoutBackslash: aChildren [ aChildren do: [ :each | self visitTextWithoutBackslash: each ] ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitCode: aMicCodeBlock [ builder newLine. @@ -154,13 +155,13 @@ MicTextualMicrodownExporter >> visitCode: aMicCodeBlock [ ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitComment: aComment [ builder comment: aComment text ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitEnvironment: anEnvironment [ builder newLine. builder @@ -170,7 +171,7 @@ MicTextualMicrodownExporter >> visitEnvironment: anEnvironment [ ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitFigure: aFigure [ builder newLine. @@ -180,7 +181,7 @@ MicTextualMicrodownExporter >> visitFigure: aFigure [ ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitHeader: aHeader [ builder newLine. @@ -189,25 +190,25 @@ MicTextualMicrodownExporter >> visitHeader: aHeader [ withLevel: aHeader level ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitHorizontalLine: aHorizontalLine [ builder horizontalLine ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitInputFile: anInputfile [ builder inputFile: anInputfile path originalString ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitItalic: anItalicFormatBlock [ builder italic: [ super visitItalic: anItalicFormatBlock ] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitLink: aLink [ builder @@ -215,13 +216,13 @@ MicTextualMicrodownExporter >> visitLink: aLink [ withDescription: [ super visitLink: aLink ] ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitListItem: anItem [ builder item: [ super visitListItem: anItem ] ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitMath: aMicMath [ builder @@ -231,19 +232,19 @@ MicTextualMicrodownExporter >> visitMath: aMicMath [ ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitMathInline: aMicMathInline [ builder mathInline: aMicMathInline substring ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitMetaData: aMetaData [ builder metaDataFromAssociations: aMetaData body ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitMonospace: aMonospaceFormat [ builder @@ -252,7 +253,7 @@ MicTextualMicrodownExporter >> visitMonospace: aMonospaceFormat [ ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitOrderedList: anOrderedList [ | block | @@ -265,13 +266,13 @@ MicTextualMicrodownExporter >> visitOrderedList: anOrderedList [ block value ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitOrderedListItem: anItem [ builder orderedItem: [ super visitListItem: anItem ] ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitParagraph: aParagraph [ builder newLine. @@ -279,26 +280,26 @@ MicTextualMicrodownExporter >> visitParagraph: aParagraph [ paragraph: [ super visitParagraph: aParagraph ] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitQuote: aQuote [ builder quoteBlock: aQuote text ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitRaw: aRawFormat [ builder rawFormat: aRawFormat substring ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitRoot: aRoot [ builder root: [ super visitRoot: aRoot ] ] -{ #category : #API } +{ #category : 'API' } MicTextualMicrodownExporter >> visitRow: row in: aTable at: i [ row do: [ :cell | @@ -307,13 +308,13 @@ MicTextualMicrodownExporter >> visitRow: row in: aTable at: i [ ^ (aTable hasHeader and: i = 1) ifTrue: [ self buildRowHeader: row ] ] -{ #category : #'visit - format' } +{ #category : 'visit - format' } MicTextualMicrodownExporter >> visitStrike: aStrikeFormat [ builder strike: [ super visitStrike: aStrikeFormat ] ] -{ #category : #API } +{ #category : 'API' } MicTextualMicrodownExporter >> visitTable: aTable [ aTable rows doWithIndex: [ :row :i | @@ -321,18 +322,18 @@ MicTextualMicrodownExporter >> visitTable: aTable [ self visitRow: row in: aTable at: i ] ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitText: aMicTextBlock [ builder text: (self backSlashString: aMicTextBlock substring) ] -{ #category : #visiting } +{ #category : 'visiting' } MicTextualMicrodownExporter >> visitTextWithoutBackslash: aMicTextBlock [ builder text: aMicTextBlock substring ] -{ #category : #'visit - block' } +{ #category : 'visit - block' } MicTextualMicrodownExporter >> visitUnorderedList: aUnorderedList [ | block | diff --git a/src/Microdown-PrettyPrinter/package.st b/src/Microdown-PrettyPrinter/package.st index d8926d73..d367056a 100644 --- a/src/Microdown-PrettyPrinter/package.st +++ b/src/Microdown-PrettyPrinter/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-PrettyPrinter' } +Package { #name : 'Microdown-PrettyPrinter' } diff --git a/src/Microdown-RenderingFeatures/MicCodeBlock.extension.st b/src/Microdown-RenderingFeatures/MicCodeBlock.extension.st index 5bef969f..25282165 100644 --- a/src/Microdown-RenderingFeatures/MicCodeBlock.extension.st +++ b/src/Microdown-RenderingFeatures/MicCodeBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicCodeBlock } +Extension { #name : 'MicCodeBlock' } -{ #category : #'*Microdown-RenderingFeatures' } +{ #category : '*Microdown-RenderingFeatures' } MicCodeBlock >> lineNumber: aBoolean [ arguments at: 'lineNumber' put: aBoolean ] diff --git a/src/Microdown-RenderingFeatures/MicCodeblockLineNumberer.class.st b/src/Microdown-RenderingFeatures/MicCodeblockLineNumberer.class.st index b348d5dc..bd935b44 100644 --- a/src/Microdown-RenderingFeatures/MicCodeblockLineNumberer.class.st +++ b/src/Microdown-RenderingFeatures/MicCodeblockLineNumberer.class.st @@ -1,14 +1,15 @@ Class { - #name : #MicCodeblockLineNumberer, - #superclass : #MicrodownVisitor, + #name : 'MicCodeblockLineNumberer', + #superclass : 'MicrodownVisitor', #instVars : [ 'stream', 'configuration' ], - #category : #'Microdown-RenderingFeatures' + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #adding } +{ #category : 'adding' } MicCodeblockLineNumberer >> add: aString untilNewLineAt: firstOccurence withNumber: number [ | length | @@ -17,7 +18,7 @@ MicCodeblockLineNumberer >> add: aString untilNewLineAt: firstOccurence withNumb ^ aString allButFirst: length ] -{ #category : #adding } +{ #category : 'adding' } MicCodeblockLineNumberer >> add: aString withNumber: number [ stream @@ -26,7 +27,7 @@ MicCodeblockLineNumberer >> add: aString withNumber: number [ << aString ] -{ #category : #adding } +{ #category : 'adding' } MicCodeblockLineNumberer >> addLineNumberTo: aCodeblock [ "I add a numerotation at each line of a script." @@ -44,30 +45,30 @@ MicCodeblockLineNumberer >> addLineNumberTo: aCodeblock [ ^ aCodeblock body: stream contents ] -{ #category : #accessing } +{ #category : 'accessing' } MicCodeblockLineNumberer >> configuration [ ^ configuration ] -{ #category : #accessing } +{ #category : 'accessing' } MicCodeblockLineNumberer >> configuration: aConfiguration [ configuration := aConfiguration ] -{ #category : #testing } +{ #category : 'testing' } MicCodeblockLineNumberer >> hasLineNumber: aCodeblock [ ^ aCodeblock arguments at: 'lineNumber' ifPresent: [ :lN | lN = 'true' or: [ lN ] ] ifAbsent: [ false ] ] -{ #category : #initialization } +{ #category : 'initialization' } MicCodeblockLineNumberer >> initialize [ super initialize. stream := MicOutputStream on: (String new writeStream). ] -{ #category : #'visiting-document' } +{ #category : 'visiting-document' } MicCodeblockLineNumberer >> visitCode: aCodeblock [ (self hasLineNumber: aCodeblock) ifTrue: [ self addLineNumberTo: aCodeblock ] diff --git a/src/Microdown-RenderingFeatures/MicCodeblockLineNumbererTest.class.st b/src/Microdown-RenderingFeatures/MicCodeblockLineNumbererTest.class.st index f72fa49a..a9681568 100644 --- a/src/Microdown-RenderingFeatures/MicCodeblockLineNumbererTest.class.st +++ b/src/Microdown-RenderingFeatures/MicCodeblockLineNumbererTest.class.st @@ -1,24 +1,25 @@ Class { - #name : #MicCodeblockLineNumbererTest, - #superclass : #TestCase, + #name : 'MicCodeblockLineNumbererTest', + #superclass : 'TestCase', #instVars : [ 'visitor', 'instance' ], - #category : #'Microdown-RenderingFeatures' + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #private } +{ #category : 'private' } MicCodeblockLineNumbererTest >> actualClass [ ^ MicCodeblockLineNumberer ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockLineNumbererTest >> configuration [ ^ MicMinimalConfiguration new ] -{ #category : #running } +{ #category : 'running' } MicCodeblockLineNumbererTest >> setUp [ super setUp. instance := self actualClass new. @@ -26,7 +27,7 @@ MicCodeblockLineNumbererTest >> setUp [ visitor configuration: self configuration ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockLineNumbererTest >> testScriptWithLineNumber [ | input | input := MicRootBlock new @@ -41,7 +42,7 @@ MicCodeblockLineNumbererTest >> testScriptWithLineNumber [ self assert: input children first body equals: '1 stream nextPut: $h; nextPut: $e; nextPut: $l; nextPutAll: ''lo''' ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockLineNumbererTest >> testScriptWithLineNumberFalse [ | input | input := MicRootBlock new @@ -56,7 +57,7 @@ MicCodeblockLineNumbererTest >> testScriptWithLineNumberFalse [ self assert: input children first body equals: 'stream nextPut: $h; nextPut: $e; nextPut: $l; nextPutAll: ''lo''' ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockLineNumbererTest >> testScriptWithSeveralLineNumbers [ | input | @@ -76,7 +77,7 @@ MicCodeblockLineNumbererTest >> testScriptWithSeveralLineNumbers [ 3 !' ] -{ #category : #tests } +{ #category : 'tests' } MicCodeblockLineNumbererTest >> testScriptWithoutParameter [ | input | input := MicRootBlock new diff --git a/src/Microdown-RenderingFeatures/MicHeadRenumbererTest.class.st b/src/Microdown-RenderingFeatures/MicHeadRenumbererTest.class.st index f4c51174..7604c13c 100644 --- a/src/Microdown-RenderingFeatures/MicHeadRenumbererTest.class.st +++ b/src/Microdown-RenderingFeatures/MicHeadRenumbererTest.class.st @@ -1,16 +1,17 @@ Class { - #name : #MicHeadRenumbererTest, - #superclass : #TestCase, - #category : #'Microdown-RenderingFeatures' + #name : 'MicHeadRenumbererTest', + #superclass : 'TestCase', + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #private } +{ #category : 'private' } MicHeadRenumbererTest >> actualClass [ ^ MicHeaderRenumberer ] -{ #category : #private } +{ #category : 'private' } MicHeadRenumbererTest >> checkWithOffset: offset [ | result input configuration | @@ -24,19 +25,19 @@ MicHeadRenumbererTest >> checkWithOffset: offset [ self assert: result level equals: offset + 3 ] -{ #category : #tests } +{ #category : 'tests' } MicHeadRenumbererTest >> configuration [ ^ self configurationClass new ] -{ #category : #tests } +{ #category : 'tests' } MicHeadRenumbererTest >> configurationClass [ ^ MicMinimalConfiguration ] -{ #category : #tests } +{ #category : 'tests' } MicHeadRenumbererTest >> executePhase: anInput with: aConfig [ ^ (self actualClass executeOn: @@ -45,19 +46,19 @@ MicHeadRenumbererTest >> executePhase: anInput with: aConfig [ withConfiguration: aConfig)) input ] -{ #category : #tests } +{ #category : 'tests' } MicHeadRenumbererTest >> testNegativeOffset [ self checkWithOffset: -4 ] -{ #category : #tests } +{ #category : 'tests' } MicHeadRenumbererTest >> testPositiveOffset [ self checkWithOffset: 2 ] -{ #category : #tests } +{ #category : 'tests' } MicHeadRenumbererTest >> testZeroOffset [ self checkWithOffset: 0 diff --git a/src/Microdown-RenderingFeatures/MicHeaderRenumberer.class.st b/src/Microdown-RenderingFeatures/MicHeaderRenumberer.class.st index b0ab2aab..85186532 100644 --- a/src/Microdown-RenderingFeatures/MicHeaderRenumberer.class.st +++ b/src/Microdown-RenderingFeatures/MicHeaderRenumberer.class.st @@ -1,13 +1,14 @@ Class { - #name : #MicHeaderRenumberer, - #superclass : #MicrodownVisitor, + #name : 'MicHeaderRenumberer', + #superclass : 'MicrodownVisitor', #instVars : [ 'configuration' ], - #category : #'Microdown-RenderingFeatures' + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #execution } +{ #category : 'execution' } MicHeaderRenumberer class >> executeOn: aContext [ self new @@ -16,26 +17,26 @@ MicHeaderRenumberer class >> executeOn: aContext [ ^ aContext ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderRenumberer >> configuration [ configuration ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderRenumberer >> configuration: anObject [ configuration := anObject. ] -{ #category : #visiting } +{ #category : 'visiting' } MicHeaderRenumberer >> initialize [ configuration := MicMinimalConfiguration new. ] -{ #category : #visiting } +{ #category : 'visiting' } MicHeaderRenumberer >> visitHeader: aHeader [ aHeader level: aHeader level + configuration headingLevelOffset diff --git a/src/Microdown-RenderingFeatures/MicLevelLetterPrinter.class.st b/src/Microdown-RenderingFeatures/MicLevelLetterPrinter.class.st index b4391b96..611ae279 100644 --- a/src/Microdown-RenderingFeatures/MicLevelLetterPrinter.class.st +++ b/src/Microdown-RenderingFeatures/MicLevelLetterPrinter.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicLevelLetterPrinter, - #superclass : #MicTitlePrinterSpecification, - #category : #'Microdown-RenderingFeatures' + #name : 'MicLevelLetterPrinter', + #superclass : 'MicTitlePrinterSpecification', + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #'rendering-element' } +{ #category : 'rendering-element' } MicLevelLetterPrinter >> renderElement: aNumber on: stream [ | alphabet position | aNumber = 0 ifTrue: [ stream nextPutAll: 'NaN'. ^self ]. diff --git a/src/Microdown-RenderingFeatures/MicLevelNumberPrinter.class.st b/src/Microdown-RenderingFeatures/MicLevelNumberPrinter.class.st index b207e6a7..c7f4f2d6 100644 --- a/src/Microdown-RenderingFeatures/MicLevelNumberPrinter.class.st +++ b/src/Microdown-RenderingFeatures/MicLevelNumberPrinter.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicLevelNumberPrinter, - #superclass : #MicTitlePrinterSpecification, - #category : #'Microdown-RenderingFeatures' + #name : 'MicLevelNumberPrinter', + #superclass : 'MicTitlePrinterSpecification', + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #'rendering-element' } +{ #category : 'rendering-element' } MicLevelNumberPrinter >> renderElement: aNumber on: stream [ aNumber printOn: stream ] diff --git a/src/Microdown-RenderingFeatures/MicLevelRomanPrinter.class.st b/src/Microdown-RenderingFeatures/MicLevelRomanPrinter.class.st index a601c0de..ea565f8a 100644 --- a/src/Microdown-RenderingFeatures/MicLevelRomanPrinter.class.st +++ b/src/Microdown-RenderingFeatures/MicLevelRomanPrinter.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicLevelRomanPrinter, - #superclass : #MicTitlePrinterSpecification, - #category : #'Microdown-RenderingFeatures' + #name : 'MicLevelRomanPrinter', + #superclass : 'MicTitlePrinterSpecification', + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #'rendering-element' } +{ #category : 'rendering-element' } MicLevelRomanPrinter >> renderElement: aNumber on: stream [ stream nextPutAll: aNumber printStringRoman ] diff --git a/src/Microdown-RenderingFeatures/MicLevelUpperLetterPrinter.class.st b/src/Microdown-RenderingFeatures/MicLevelUpperLetterPrinter.class.st index 14a23e84..f0c7f75c 100644 --- a/src/Microdown-RenderingFeatures/MicLevelUpperLetterPrinter.class.st +++ b/src/Microdown-RenderingFeatures/MicLevelUpperLetterPrinter.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicLevelUpperLetterPrinter, - #superclass : #MicTitlePrinterSpecification, - #category : #'Microdown-RenderingFeatures' + #name : 'MicLevelUpperLetterPrinter', + #superclass : 'MicTitlePrinterSpecification', + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #'rendering-element' } +{ #category : 'rendering-element' } MicLevelUpperLetterPrinter >> renderElement: aNumber on: stream [ | alphabet position | aNumber = 0 diff --git a/src/Microdown-RenderingFeatures/MicTitlePrinter.class.st b/src/Microdown-RenderingFeatures/MicTitlePrinter.class.st index c870beef..b48932a4 100644 --- a/src/Microdown-RenderingFeatures/MicTitlePrinter.class.st +++ b/src/Microdown-RenderingFeatures/MicTitlePrinter.class.st @@ -1,16 +1,17 @@ Class { - #name : #MicTitlePrinter, - #superclass : #Object, + #name : 'MicTitlePrinter', + #superclass : 'Object', #instVars : [ 'levels' ], #classVars : [ 'StrategyMapping' ], - #category : #'Microdown-RenderingFeatures' + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter class >> defaultStrategyMapping [ ^ Dictionary @@ -20,7 +21,7 @@ MicTitlePrinter class >> defaultStrategyMapping [ with: 'upperLetter' -> MicLevelUpperLetterPrinter ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter class >> printerSpecFor: aStyle [ ^ (self strategyClassMapping at: aStyle) new @@ -28,12 +29,12 @@ MicTitlePrinter class >> printerSpecFor: aStyle [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter class >> strategyClassMapping [ ^ StrategyMapping ifNil: [ StrategyMapping := self defaultStrategyMapping ] ] -{ #category : #initialization } +{ #category : 'initialization' } MicTitlePrinter >> initialize [ super initialize. @@ -46,91 +47,91 @@ MicTitlePrinter >> initialize [ yourself) ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level1 [ ^ levels at: (self levelIndex: 1) ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level1: aLevelSpec [ self level: aLevelSpec n: 1 ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level2 [ ^ levels at: (self levelIndex: 2) ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level2: aLevelSpec [ self level: aLevelSpec n: 2 ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level3 [ ^ levels at: (self levelIndex: 3) ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level3: aLevelSpec [ self level: aLevelSpec n: 3 ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level4 [ ^levels at: (self levelIndex: 4) ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level4: aLevelSpec [ self level: aLevelSpec n: 4 ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level5 [ ^ levels at: (self levelIndex: 5) ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level5: aLevelSpec [ self level: aLevelSpec n: 5 ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level6 [ ^ levels at: (self levelIndex: 6) ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level6: aLevelSpec [ self level: aLevelSpec n: 6 ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level7 [ ^ levels at: (self levelIndex: 7) ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level7: aLevelSpec [ self level: aLevelSpec n: 7 ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> level: aLevelSpec n: n [ levels at: (self levelIndex: n) put: aLevelSpec. @@ -138,37 +139,37 @@ MicTitlePrinter >> level: aLevelSpec n: n [ aLevelSpec printer: self. ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> levelConfigurationFor: aHeader [ "to get the associated level spec" ^ self perform: ('level' , aHeader level asString) asSymbol ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> levelIndex: wishedLevel [ ^ wishedLevel ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> leveln: anInteger [ ^ self perform: ('level', anInteger asString) asSymbol ] -{ #category : #initialization } +{ #category : 'initialization' } MicTitlePrinter >> maxLevels [ ^ 7 ] -{ #category : #builder } +{ #category : 'builder' } MicTitlePrinter >> printerSpecFor: aStyle [ ^ self class printerSpecFor: aStyle ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinter >> strategyClassFor: aStyle [ ^ self class strategyClassMapping at: aStyle ifAbsent: [ 'roman' ] diff --git a/src/Microdown-RenderingFeatures/MicTitlePrinterSpecification.class.st b/src/Microdown-RenderingFeatures/MicTitlePrinterSpecification.class.st index 2cb5804a..b3323ac6 100644 --- a/src/Microdown-RenderingFeatures/MicTitlePrinterSpecification.class.st +++ b/src/Microdown-RenderingFeatures/MicTitlePrinterSpecification.class.st @@ -1,6 +1,6 @@ Class { - #name : #MicTitlePrinterSpecification, - #superclass : #Object, + #name : 'MicTitlePrinterSpecification', + #superclass : 'Object', #instVars : [ 'numbering', 'size', @@ -11,20 +11,21 @@ Class { 'printer', 'renderAs' ], - #category : #'Microdown-RenderingFeatures' + #category : 'Microdown-RenderingFeatures', + #package : 'Microdown-RenderingFeatures' } -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } MicTitlePrinterSpecification class >> defaultLevel [ ^ 1 ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicTitlePrinterSpecification class >> new [ ^ self with: Dictionary new ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicTitlePrinterSpecification class >> with: aDictionary [ "what a ugly API" | inst | @@ -39,34 +40,34 @@ MicTitlePrinterSpecification class >> with: aDictionary [ ^ inst ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> autoAnchor [ ^ autoAnchor ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> autoAnchor: anObject [ autoAnchor := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> capitalization [ ^ capitalization ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> capitalization: anObject [ capitalization := anObject ] -{ #category : #rendering } +{ #category : 'rendering' } MicTitlePrinterSpecification >> elementSeparator [ "why hardcoding it?" ^ $. ] -{ #category : #initialization } +{ #category : 'initialization' } MicTitlePrinterSpecification >> fillFromAnother: another [ "copy all the field from another instance this is used to convert a configuration specification to an instance of one of the subclasses." "the equivalent of a changeClassToThatOf:" @@ -79,12 +80,12 @@ MicTitlePrinterSpecification >> fillFromAnother: another [ self size: another size ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> headerSize [ ^ size ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> headerSize: anInteger [ "Pay attention changing the size only makes sense when numbering is true." @@ -93,7 +94,7 @@ MicTitlePrinterSpecification >> headerSize: anInteger [ ifFalse: [ 0 ] ] -{ #category : #initialization } +{ #category : 'initialization' } MicTitlePrinterSpecification >> initialize [ super initialize. @@ -104,40 +105,40 @@ MicTitlePrinterSpecification >> initialize [ renderAs := 'number' ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> level [ ^ level ifNil: [ self class defaultLevel ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> level: anObject [ level := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> numbering [ ^ numbering ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> numbering: anObject [ numbering := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> predecessor [ ^ level = 1 ifTrue: [ nil ] ifFalse: [ self printer perform: ('level' , (self level - 1) asString) asSymbol ] ] -{ #category : #rendering } +{ #category : 'rendering' } MicTitlePrinterSpecification >> printCounter: aCollection [ ^ String streamContents: [ :s | self printCounter: aCollection withMaxSize: self size on: s ] ] -{ #category : #rendering } +{ #category : 'rendering' } MicTitlePrinterSpecification >> printCounter: aCollection withMaxSize: aSize on: stream [ aSize > 0 ifTrue: [ (self predecessor isNotNil and: [ aSize - 1 > 0 ]) @@ -147,13 +148,13 @@ MicTitlePrinterSpecification >> printCounter: aCollection withMaxSize: aSize on: self printElement: aCollection last on: stream ] ] -{ #category : #'rendering-element' } +{ #category : 'rendering-element' } MicTitlePrinterSpecification >> printElement: aNumber on: stream [ aNumber = -1 ifFalse: [ self renderElement: aNumber on: stream ] ] -{ #category : #printing } +{ #category : 'printing' } MicTitlePrinterSpecification >> printOn: aStream [ super printOn: aStream. @@ -163,41 +164,41 @@ MicTitlePrinterSpecification >> printOn: aStream [ nextPutAll: self autoAnchor asString. ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> printer [ ^ printer ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> printer: aPrinter [ printer := aPrinter ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> renderAs [ "only use during serialisation to serve as an marker to create instance of adequate subclasses" ^ renderAs ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> renderAs: aString [ "only use during serialisation" renderAs := aString ] -{ #category : #'rendering-element' } +{ #category : 'rendering-element' } MicTitlePrinterSpecification >> renderElement: aNumber on: stream [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> size [ ^ self headerSize ] -{ #category : #accessing } +{ #category : 'accessing' } MicTitlePrinterSpecification >> size: anInteger [ "Pay attention changing the size only makes sense when numbering is true." self headerSize: anInteger diff --git a/src/Microdown-RenderingFeatures/package.st b/src/Microdown-RenderingFeatures/package.st index 8f44c9e5..1b457f57 100644 --- a/src/Microdown-RenderingFeatures/package.st +++ b/src/Microdown-RenderingFeatures/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-RenderingFeatures' } +Package { #name : 'Microdown-RenderingFeatures' } diff --git a/src/Microdown-ResolvePath-Tests/package.st b/src/Microdown-ResolvePath-Tests/package.st index 34b72121..80cd5bd5 100644 --- a/src/Microdown-ResolvePath-Tests/package.st +++ b/src/Microdown-ResolvePath-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-ResolvePath-Tests' } +Package { #name : 'Microdown-ResolvePath-Tests' } diff --git a/src/Microdown-ResolvePath/package.st b/src/Microdown-ResolvePath/package.st index e6028432..76a2a415 100644 --- a/src/Microdown-ResolvePath/package.st +++ b/src/Microdown-ResolvePath/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-ResolvePath' } +Package { #name : 'Microdown-ResolvePath' } diff --git a/src/Microdown-RichTextComposer-Tests/ManifestMicrodownRichTextComposerTests.class.st b/src/Microdown-RichTextComposer-Tests/ManifestMicrodownRichTextComposerTests.class.st index 084c955d..d30aef89 100644 --- a/src/Microdown-RichTextComposer-Tests/ManifestMicrodownRichTextComposerTests.class.st +++ b/src/Microdown-RichTextComposer-Tests/ManifestMicrodownRichTextComposerTests.class.st @@ -2,7 +2,9 @@ Some specific microdown rich text integration tests. " Class { - #name : #ManifestMicrodownRichTextComposerTests, - #superclass : #PackageManifest, - #category : #'Microdown-RichTextComposer-Tests-Manifest' + #name : 'ManifestMicrodownRichTextComposerTests', + #superclass : 'PackageManifest', + #category : 'Microdown-RichTextComposer-Tests-Manifest', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Manifest' } diff --git a/src/Microdown-RichTextComposer-Tests/MicCenterAlignmentBlockTest.class.st b/src/Microdown-RichTextComposer-Tests/MicCenterAlignmentBlockTest.class.st index 83de140f..76b363d2 100644 --- a/src/Microdown-RichTextComposer-Tests/MicCenterAlignmentBlockTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicCenterAlignmentBlockTest.class.st @@ -2,12 +2,14 @@ A MicCenterAllignmentBlockTest is a test class for testing the behavior of MicCenterAllignmentBlock " Class { - #name : #MicCenterAlignmentBlockTest, - #superclass : #TestCase, - #category : #'Microdown-RichTextComposer-Tests-BlockExtensions' + #name : 'MicCenterAlignmentBlockTest', + #superclass : 'TestCase', + #category : 'Microdown-RichTextComposer-Tests-BlockExtensions', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'BlockExtensions' } -{ #category : #tests } +{ #category : 'tests' } MicCenterAlignmentBlockTest >> testCenter [ | src doc center | src := ' diff --git a/src/Microdown-RichTextComposer-Tests/MicCodeSemanticActionTest.class.st b/src/Microdown-RichTextComposer-Tests/MicCodeSemanticActionTest.class.st index 3f36c9e6..a41961f0 100644 --- a/src/Microdown-RichTextComposer-Tests/MicCodeSemanticActionTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicCodeSemanticActionTest.class.st @@ -1,23 +1,25 @@ Class { - #name : #MicCodeSemanticActionTest, - #superclass : #TestCase, - #category : #'Microdown-RichTextComposer-Tests-Composer' + #name : 'MicCodeSemanticActionTest', + #superclass : 'TestCase', + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> semanticActionClass [ ^ MicSemanticAction ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testArrayShouldNotBreak [ self deny: (self semanticActionClass fromTokens: #( 1 #+ 2 #* 3 )) hasEntity. self deny: (self semanticActionClass fromTokens: #( 1 #+ 2 #* )) hasEntity ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testChevronWithBrokenArguments [ self assert: (self semanticActionClass fromTokens: #( Point #>> 2 )) entity isNil. @@ -27,7 +29,7 @@ MicCodeSemanticActionTest >> testChevronWithBrokenArguments [ self assert: (self semanticActionClass fromTokens: #( Point #>> Point )) entity isNil ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testChevronWithBrokenReceiver [ self assert: (self semanticActionClass fromTokens: #( 1 #>> 2 )) entity isNil. @@ -40,19 +42,19 @@ MicCodeSemanticActionTest >> testChevronWithBrokenReceiver [ self assert: (self semanticActionClass fromTokens: #( ClassThatDoesNotExist class #>> 2 )) entity isNil ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testDoubleDollars [ self deny: (self semanticActionClass from: '$$') hasEntity ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testEmptyString [ self deny: (self semanticActionClass from: '') hasEntity ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testGlobalAccess [ self assert: (self semanticActionClass fromTokens: #( Transcript )) hasEntity @@ -60,31 +62,31 @@ MicCodeSemanticActionTest >> testGlobalAccess [ used by the browse invocation when clicking on it. " ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testMoreSpaces [ self deny: (self semanticActionClass from: ' ') hasEntity ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testOneSpace [ self deny: (self semanticActionClass from: ' ') hasEntity ] -{ #category : #'tests - metaclass' } +{ #category : 'tests - metaclass' } MicCodeSemanticActionTest >> testReferenceToABrokenMetaClass [ self assert: (self semanticActionClass from: 'Point2 class') entity isNil ] -{ #category : #'tests - metaclass' } +{ #category : 'tests - metaclass' } MicCodeSemanticActionTest >> testReferenceToABrokenMetaClass2 [ self assert: (self semanticActionClass from: 'Point grgrgr') entity isNil ] -{ #category : #'tests - class' } +{ #category : 'tests - class' } MicCodeSemanticActionTest >> testReferenceToAClass [ self @@ -92,7 +94,7 @@ MicCodeSemanticActionTest >> testReferenceToAClass [ equals: Point ] -{ #category : #'tests - metaclass' } +{ #category : 'tests - metaclass' } MicCodeSemanticActionTest >> testReferenceToAMetaClass [ self @@ -100,7 +102,7 @@ MicCodeSemanticActionTest >> testReferenceToAMetaClass [ equals: Point class ] -{ #category : #'tests - methods' } +{ #category : 'tests - methods' } MicCodeSemanticActionTest >> testReferenceToAMethod [ self @@ -108,31 +110,31 @@ MicCodeSemanticActionTest >> testReferenceToAMethod [ equals: 'Point>>#setX:setY:' ] -{ #category : #'tests - methods' } +{ #category : 'tests - methods' } MicCodeSemanticActionTest >> testReferenceToANonExistingMethod [ self assert: (self semanticActionClass from: 'Point >> 12+3 ') entity isNil ] -{ #category : #'tests - methods' } +{ #category : 'tests - methods' } MicCodeSemanticActionTest >> testReferenceToANonExistingMethodBecauseOfBogusClass [ self assert: (self semanticActionClass from: 'Point222 >> #setX:setY:') entity isNil ] -{ #category : #'tests - methods' } +{ #category : 'tests - methods' } MicCodeSemanticActionTest >> testReferenceToANonExistingMethodBecauseOfNoSymbol [ self assert: (self semanticActionClass from: 'Point >> setX:setY2:') entity isNil ] -{ #category : #'tests - package' } +{ #category : 'tests - package' } MicCodeSemanticActionTest >> testReferenceToANonExistingPackage [ self assert: (self semanticActionClass from: #Pillar) entity isNil ] -{ #category : #'tests - package' } +{ #category : 'tests - package' } MicCodeSemanticActionTest >> testReferenceToAPackage [ self @@ -140,13 +142,13 @@ MicCodeSemanticActionTest >> testReferenceToAPackage [ equals: 'Microdown' ] -{ #category : #'tests - class' } +{ #category : 'tests - class' } MicCodeSemanticActionTest >> testReferenceToNonExistingClass [ self deny: (self semanticActionClass from: 'Point22') hasEntity ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testScannerShouldNotFail [ self deny: (self semanticActionClass from: 'half"baked') hasEntity. @@ -155,7 +157,7 @@ MicCodeSemanticActionTest >> testScannerShouldNotFail [ self deny: (self semanticActionClass from: 16rFFFD asCharacter asString) hasEntity. ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testTwoBogusElements [ self assert: @@ -166,7 +168,7 @@ MicCodeSemanticActionTest >> testTwoBogusElements [ (self semanticActionClass fromTokens: #( Point #foo )) entity isNil ] -{ #category : #'test - bogus entry' } +{ #category : 'test - bogus entry' } MicCodeSemanticActionTest >> testTwoSpaces [ self deny: (self semanticActionClass from: ' ') hasEntity diff --git a/src/Microdown-RichTextComposer-Tests/MicDynamicTextStylerTest.class.st b/src/Microdown-RichTextComposer-Tests/MicDynamicTextStylerTest.class.st index 3e8d2d41..8f274b14 100644 --- a/src/Microdown-RichTextComposer-Tests/MicDynamicTextStylerTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicDynamicTextStylerTest.class.st @@ -2,12 +2,14 @@ A MicDynamicTextStylerTest is a test class for testing the behavior of MicDynamicTextStyler " Class { - #name : #MicDynamicTextStylerTest, - #superclass : #TestCase, - #category : #'Microdown-RichTextComposer-Tests-Composer' + #name : 'MicDynamicTextStylerTest', + #superclass : 'TestCase', + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testBodyFont [ | styler | styler := MicDynamicTextStyler new. @@ -17,7 +19,7 @@ MicDynamicTextStylerTest >> testBodyFont [ self assert: styler bodyFont pointSize equals: 72. ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testBulletForLevel [ | styler | styler := MicDynamicTextStyler new. @@ -27,17 +29,17 @@ MicDynamicTextStylerTest >> testBulletForLevel [ self assert: (styler bulletForLevel: 4) equals: 'a' asText. ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testBullets [ "I am not needed as I am tested by testCounterForAtLevel, but being here marks counters: as tested" ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testCodeBackgroundColor [ ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testCounterForAtLevel [ | styler | styler := MicDynamicTextStyler new. @@ -48,12 +50,12 @@ MicDynamicTextStylerTest >> testCounterForAtLevel [ self assert: (styler counterFor: 5 atLevel: 5) equals: 'e)' asText. ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testCounters [ "I am not needed as I am tested by testCounterForAtLevel, but being here marks counters: as tested" ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testCrAfterHeader [ | styler | styler := MicDynamicTextStyler new. @@ -64,7 +66,7 @@ MicDynamicTextStylerTest >> testCrAfterHeader [ ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testHeaderFontForLevel [ | styler | styler := MicDynamicTextStyler new. @@ -73,7 +75,7 @@ MicDynamicTextStylerTest >> testHeaderFontForLevel [ self assert: (styler headerLevelFont: 1) font pointSize equals: 72. ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testHeaderFontForLevel_wrongFormat [ | styler | styler := MicDynamicTextStyler new. @@ -82,7 +84,7 @@ MicDynamicTextStylerTest >> testHeaderFontForLevel_wrongFormat [ ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testHeaderFontForLevel_wrongLevel [ | styler | styler := MicDynamicTextStyler new. @@ -90,7 +92,7 @@ MicDynamicTextStylerTest >> testHeaderFontForLevel_wrongLevel [ self assert: styler errors isNotEmpty ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testInterblockSpacing [ | styler | styler := MicDynamicTextStyler new. @@ -101,7 +103,7 @@ MicDynamicTextStylerTest >> testInterblockSpacing [ self assert: styler interBlockSpacing equals: (String cr, String cr) asText ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testKeepCRFromInput [ | styler textSample| styler := MicDynamicTextStyler new. @@ -112,7 +114,7 @@ MicDynamicTextStylerTest >> testKeepCRFromInput [ ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testMonospaceBackgroundColor [ | styler | styler := MicDynamicTextStyler new. @@ -124,7 +126,7 @@ MicDynamicTextStylerTest >> testMonospaceBackgroundColor [ ] -{ #category : #tests } +{ #category : 'tests' } MicDynamicTextStylerTest >> testNewLineIfNotAlready [ | styler | styler := MicDynamicTextStyler new. diff --git a/src/Microdown-RichTextComposer-Tests/MicMockBaselineOf.class.st b/src/Microdown-RichTextComposer-Tests/MicMockBaselineOf.class.st index 98d634de..91077731 100644 --- a/src/Microdown-RichTextComposer-Tests/MicMockBaselineOf.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicMockBaselineOf.class.st @@ -1,5 +1,7 @@ Class { - #name : #MicMockBaselineOf, - #superclass : #BaselineOf, - #category : #'Microdown-RichTextComposer-Tests-Composer' + #name : 'MicMockBaselineOf', + #superclass : 'BaselineOf', + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } diff --git a/src/Microdown-RichTextComposer-Tests/MicParsesAndRendersAllCommentsTest.class.st b/src/Microdown-RichTextComposer-Tests/MicParsesAndRendersAllCommentsTest.class.st index b1a300c9..b389cc07 100644 --- a/src/Microdown-RichTextComposer-Tests/MicParsesAndRendersAllCommentsTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicParsesAndRendersAllCommentsTest.class.st @@ -2,19 +2,21 @@ I test that rendering no class comments make microdown parser or renderer fail " Class { - #name : #MicParsesAndRendersAllCommentsTest, - #superclass : #TestCase, - #category : #'Microdown-RichTextComposer-Tests-Composer' + #name : 'MicParsesAndRendersAllCommentsTest', + #superclass : 'TestCase', + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #tests } +{ #category : 'tests' } MicParsesAndRendersAllCommentsTest >> testCommentFromChunkReadStream [ "Test that we do not break on empty annotated blocks" Microdown asRichText: ChunkReadStream comment. Microdown asRichText: '!!' ] -{ #category : #tests } +{ #category : 'tests' } MicParsesAndRendersAllCommentsTest >> testCommentFromConfigurationCommandLineHandler [ Microdown asRichText: ConfigurationCommandLineHandler comment. "Command line handler for dealing with Metacello configurations from the command line @@ -51,14 +53,14 @@ Examples: " ] -{ #category : #tests } +{ #category : 'tests' } MicParsesAndRendersAllCommentsTest >> testCommentFromFluidBuilder [ "Test that we do not break on empty code blocks" Microdown asRichText: '``` ```' ] -{ #category : #tests } +{ #category : 'tests' } MicParsesAndRendersAllCommentsTest >> testSmokeSignalAndChoke [ | difficultClasses | "this test disables error handling and tries to render all class comments in the system" diff --git a/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerDummyForTest.class.st b/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerDummyForTest.class.st index 10288ee1..8ce4e09a 100644 --- a/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerDummyForTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerDummyForTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicRichTextCodeBlockStylerDummyForTest, - #superclass : #MicRichTextCodeBlockStyler, - #category : #'Microdown-RichTextComposer-Tests-Composer' + #name : 'MicRichTextCodeBlockStylerDummyForTest', + #superclass : 'MicRichTextCodeBlockStyler', + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #accessing } +{ #category : 'accessing' } MicRichTextCodeBlockStylerDummyForTest class >> styleTags [ ^ #(dummyForTest) ] -{ #category : #accessing } +{ #category : 'accessing' } MicRichTextCodeBlockStylerDummyForTest >> style: sString [ ^ '§dummy§' asText ] diff --git a/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerTest.class.st b/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerTest.class.st index dd5ff3d6..0b140fb3 100644 --- a/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicRichTextCodeBlockStylerTest.class.st @@ -2,17 +2,19 @@ A MicRichTextCodeBlockStylerTest is a test class for testing the behavior of MicRichTextCodeBlockStyler " Class { - #name : #MicRichTextCodeBlockStylerTest, - #superclass : #TestCase, - #category : #'Microdown-RichTextComposer-Tests-Composer' + #name : 'MicRichTextCodeBlockStylerTest', + #superclass : 'TestCase', + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #accessing } +{ #category : 'accessing' } MicRichTextCodeBlockStylerTest >> stylerFor: aLanguage [ ^ MicRichTextCodeBlockStyler stylerFor: aLanguage ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextCodeBlockStylerTest >> testDefaultStylerIsFound [ | defaultStyler | @@ -20,7 +22,7 @@ MicRichTextCodeBlockStylerTest >> testDefaultStylerIsFound [ self assert: defaultStyler class equals: MicRichTextCodeBlockStylerDefault ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextCodeBlockStylerTest >> testStylerForMethod [ | code richText blueLocation textColor | @@ -41,7 +43,7 @@ styledTextFor: aString asFest'. self assert: textColor color red equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextCodeBlockStylerTest >> testStylerForSmalltalk [ | code richText blueLocation textColor | @@ -60,7 +62,7 @@ green isColored: yellow self assert: textColor color red equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextCodeBlockStylerTest >> testStylersForText [ | defaultStyler | diff --git a/src/Microdown-RichTextComposer-Tests/MicRichTextComposerTest.class.st b/src/Microdown-RichTextComposer-Tests/MicRichTextComposerTest.class.st index e639631f..d6d8ae5b 100644 --- a/src/Microdown-RichTextComposer-Tests/MicRichTextComposerTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicRichTextComposerTest.class.st @@ -1,131 +1,133 @@ Class { - #name : #MicRichTextComposerTest, - #superclass : #TestCase, + #name : 'MicRichTextComposerTest', + #superclass : 'TestCase', #instVars : [ 'sample', 'parser', 'composer', 'offlineStatus' ], - #category : #'Microdown-RichTextComposer-Tests-Composer' + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } MicRichTextComposerTest class >> sampleMicrodownForInputTest [ ^ '# TestHeader body for testing' ] -{ #category : #helpers } +{ #category : 'helpers' } MicRichTextComposerTest >> assertWriting: aPRDocument include: expectedAttribute [ self assert: ((self runsOf: aPRDocument) includes: {expectedAttribute}) ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> boldFormat [ ^ TextEmphasis bold ] -{ #category : #helpers } +{ #category : 'helpers' } MicRichTextComposerTest >> composer [ composer ifNotNil: [ ^ composer ]. ^ composer := self composerClass new ] -{ #category : #helpers } +{ #category : 'helpers' } MicRichTextComposerTest >> composerClass [ ^ MicRichTextComposer ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> externalLink: aLink [ ^ TextAction new actOnClickBlock: [WebBrowser openOn: aLink] ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> figure: aFigureLink [ | url | url := aFigureLink. ^ TextAnchor new anchoredMorph: (ZnEasy getPng: url) ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> headerLevel1 [ ^ self composer textStyler headerLevelFont: 1 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> headerLevel2 [ ^ self composer textStyler headerLevelFont: 2 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> headerLevel3 [ ^ self composer textStyler headerLevelFont: 3 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> headerLevel4 [ ^ self composer textStyler headerLevelFont: 4 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> headerLevel5 [ ^ self composer textStyler headerLevelFont: 5 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> headerLevel6 [ ^ self composer textStyler headerLevelFont: 6 ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> italicFormat [ ^ TextEmphasis italic ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> microElementsFrom: aString [ ^ sample documentFrom: aString. ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> monospaceFormat [ ^ TextBackgroundColor color: Smalltalk ui theme settings windowColor ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> normalFormat [ ^ TextEmphasis normal ] -{ #category : #helpers } +{ #category : 'helpers' } MicRichTextComposerTest >> richTextFor: aDocument [ ^ self composer visit: aDocument ] -{ #category : #helpers } +{ #category : 'helpers' } MicRichTextComposerTest >> richTextForString: aString [ ^ self composer asRichText: aString ] -{ #category : #helpers } +{ #category : 'helpers' } MicRichTextComposerTest >> runsOf: aDocument [ ^ (self richTextFor: aDocument) runs ] -{ #category : #running } +{ #category : 'running' } MicRichTextComposerTest >> setUp [ super setUp. sample := MicMicrodownSnippetFactory new. @@ -135,34 +137,34 @@ MicRichTextComposerTest >> setUp [ MicRichTextComposer initialize. ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> strikethroughtFormat [ ^ TextEmphasis struckOut ] -{ #category : #helpers } +{ #category : 'helpers' } MicRichTextComposerTest >> stringOf: aPRDocument [ ^ (self richTextFor: aPRDocument) string ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> subscriptFormat [ ^ TextColor red ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> superscriptFormat [ ^ TextColor blue ] -{ #category : #running } +{ #category : 'running' } MicRichTextComposerTest >> tearDown [ Microdown offline: offlineStatus. super tearDown. ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testBackslashLast [ | source richText | source := 'I am a text which ends in \'. @@ -170,7 +172,7 @@ MicRichTextComposerTest >> testBackslashLast [ self assert: richText asString trim equals: source ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testBackslashNoBreak [ "This test is related to issue: https://github.com/pillar-markup/Microdown/issues/107" | source richText | @@ -187,13 +189,13 @@ Subclasses may change the definition of names by redefining isCurrentALetter.'. self assert: true "I did not fail" ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> testBoldFormat [ self assertWriting: (self microElementsFrom: sample boldFormatSample) include: self boldFormat ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> testCenter [ | src doc| src := ' @@ -204,7 +206,7 @@ This is centered self assertWriting: doc include: TextAlignment centered ] -{ #category : #'tests - codeBlock' } +{ #category : 'tests - codeBlock' } MicRichTextComposerTest >> testCodeBlock [ | source runs richText | @@ -223,7 +225,7 @@ line 2 line 2' ] -{ #category : #'tests - codeBlock' } +{ #category : 'tests - codeBlock' } MicRichTextComposerTest >> testCodeBlockStylerExplicitLanguage [ | source richText expected | @@ -238,7 +240,7 @@ line 2 self assert: richText asString trim equals: expected ] -{ #category : #'tests - codeBlock' } +{ #category : 'tests - codeBlock' } MicRichTextComposerTest >> testCodeBlockStylerShortHand [ | source richText expected | @@ -253,7 +255,7 @@ line 2 self assert: richText asString trim equals: expected ] -{ #category : #'tests - codeBlock' } +{ #category : 'tests - codeBlock' } MicRichTextComposerTest >> testCodeBlockWithCaption [ | source runs richText | @@ -275,7 +277,7 @@ line 2 Roger Rabbit' ] -{ #category : #'tests - codeBlock' } +{ #category : 'tests - codeBlock' } MicRichTextComposerTest >> testCodeBlockWithTabbedCode [ | source richText | @@ -290,7 +292,7 @@ MicRichTextComposerTest >> testCodeBlockWithTabbedCode [ 8' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testEnvironment_unknownShouldNotFail [ | src | src := ' @@ -301,7 +303,7 @@ stuff Microdown asRichText: src ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testExternaLink [ | source richText obj1 | @@ -312,7 +314,7 @@ MicRichTextComposerTest >> testExternaLink [ self assert: obj1 class name equals: #TextAction ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testFigureCaptionMissingRemote [ | source richText| @@ -323,7 +325,7 @@ MicRichTextComposerTest >> testFigureCaptionMissingRemote [ self assert: richText asTextMorph height < 100 "No image embedded" ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testFigureCaptionRemote [ | source richText | @@ -334,7 +336,7 @@ MicRichTextComposerTest >> testFigureCaptionRemote [ self assert: richText asTextMorph height > 100 "It is high because of the embedded image" ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testFigureNoCaptionRemote [ | source richText | @@ -345,7 +347,7 @@ MicRichTextComposerTest >> testFigureNoCaptionRemote [ self assert: richText asTextMorph height > 100 "It is high because of the embedded image" ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> testHeaderLevel1 [ self @@ -353,7 +355,7 @@ MicRichTextComposerTest >> testHeaderLevel1 [ include: self headerLevel1 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> testHeaderLevel2 [ self @@ -361,7 +363,7 @@ MicRichTextComposerTest >> testHeaderLevel2 [ include: self headerLevel2 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> testHeaderLevel3 [ self @@ -369,7 +371,7 @@ MicRichTextComposerTest >> testHeaderLevel3 [ include: self headerLevel3 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> testHeaderLevel4 [ self @@ -377,7 +379,7 @@ MicRichTextComposerTest >> testHeaderLevel4 [ include: self headerLevel4 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> testHeaderLevel5 [ self @@ -385,7 +387,7 @@ MicRichTextComposerTest >> testHeaderLevel5 [ include: self headerLevel5 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicRichTextComposerTest >> testHeaderLevel6 [ self @@ -393,7 +395,7 @@ MicRichTextComposerTest >> testHeaderLevel6 [ include: self headerLevel6 ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testInputfile [ | source result | @@ -403,7 +405,7 @@ MicRichTextComposerTest >> testInputfile [ self assert: (result includesSubstring: 'body for test') ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testItalicFormat [ | source runs richText | @@ -416,7 +418,7 @@ MicRichTextComposerTest >> testItalicFormat [ self deny: ((runs at: 6 "the h in have") includes: self italicFormat ). ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicRichTextComposerTest >> testLatexMathStyleEmpty [ | source richText | @@ -425,7 +427,7 @@ MicRichTextComposerTest >> testLatexMathStyleEmpty [ self assert: richText asString trim equals: 'foobar' . ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicRichTextComposerTest >> testListAreCorrectlyNumbered [ | source richText | @@ -441,7 +443,7 @@ MicRichTextComposerTest >> testListAreCorrectlyNumbered [ ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testMathEnvironmentError [ | source richText | source := 'foo @@ -455,7 +457,7 @@ $$ $$ - LATEX ERROR - $$' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testNestedList [ "I just need to be here and succeed to override an existing test which is obsolete" | silly | @@ -463,7 +465,7 @@ MicRichTextComposerTest >> testNestedList [ self assert: silly equals: silly ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testNestedMixedList [ | source richText runs | @@ -483,7 +485,7 @@ MicRichTextComposerTest >> testNestedMixedList [ ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testNestedMixedListNoEmptyLinesEfterSubLists [ | source output | @@ -500,7 +502,7 @@ MicRichTextComposerTest >> testNestedMixedListNoEmptyLinesEfterSubLists [ ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testNestedUnorderdList [ | source richText | @@ -518,7 +520,7 @@ MicRichTextComposerTest >> testNestedUnorderdList [ ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicRichTextComposerTest >> testNewDictionaryAPI [ | dict | @@ -526,7 +528,7 @@ MicRichTextComposerTest >> testNewDictionaryAPI [ self assert: (dict at: #a) equals: 1 ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicRichTextComposerTest >> testNoNSuperfluousNewLines [ | source richText expected | @@ -540,7 +542,7 @@ And this is just an other paragraph'. self assert: richText asString equals: expected ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicRichTextComposerTest >> testNosuperfluousNewLines [ | source richText expected | @@ -550,7 +552,7 @@ MicRichTextComposerTest >> testNosuperfluousNewLines [ self assert: richText asString equals: expected ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicRichTextComposerTest >> testOrderedList [ | source richText runs | @@ -568,7 +570,7 @@ MicRichTextComposerTest >> testOrderedList [ ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testOrderedNestedList [ | source richText | source := ' @@ -582,7 +584,7 @@ MicRichTextComposerTest >> testOrderedNestedList [ ] -{ #category : #'tests - paragraph' } +{ #category : 'tests - paragraph' } MicRichTextComposerTest >> testParagraphNotFormat [ | runs richText | @@ -594,7 +596,7 @@ barwith a space'). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testQuoteBlock [ | src richText | "Quote blocks have not been implemented" @@ -604,14 +606,14 @@ MicRichTextComposerTest >> testQuoteBlock [ self deny: (richText asString findString: 'foo') equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testRaw [ | text | text := Microdown asRichText: '{{**not bold**}}'. self assert: text asString trim equals: '**not bold**'. ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testRawNewLinesPreserved [ | text | text := Microdown asRichText: '{{**not @@ -620,7 +622,7 @@ bold**}}'. bold**'. ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> testRightAlignment [ | src doc| src := ' @@ -631,7 +633,7 @@ This is righted self assertWriting: doc include: TextAlignment rightFlush ] -{ #category : #'skipped tests' } +{ #category : 'skipped tests' } MicRichTextComposerTest >> testStrikethroughFormat [ | source runs richText | source := 'This have been ~deleted~'. @@ -643,7 +645,7 @@ MicRichTextComposerTest >> testStrikethroughFormat [ self deny: ((runs at: 6 "the h in have") includes: self strikethroughtFormat ). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextComposerTest >> testStylerForMethod [ | code source richText blueLocation textColor | @@ -669,7 +671,7 @@ styledTextFor: aString asFest'. self assert: textColor color red equals: 0. ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicRichTextComposerTest >> testUnorderedList [ | source richText runs | @@ -685,7 +687,7 @@ MicRichTextComposerTest >> testUnorderedList [ self assert: (runs at: 29) first amount equals: 2. ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicRichTextComposerTest >> underlineFormat [ ^ TextEmphasis underlined ] diff --git a/src/Microdown-RichTextComposer-Tests/MicRichTextFormatConfigurationTest.class.st b/src/Microdown-RichTextComposer-Tests/MicRichTextFormatConfigurationTest.class.st index 8daace63..eb63d587 100644 --- a/src/Microdown-RichTextComposer-Tests/MicRichTextFormatConfigurationTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicRichTextFormatConfigurationTest.class.st @@ -2,17 +2,19 @@ A MicRichTextFormatConfigurationTest is a test class for testing the behavior of MicRichTextFormatConfiguration " Class { - #name : #MicRichTextFormatConfigurationTest, - #superclass : #TestCase, - #category : #'Microdown-RichTextComposer-Tests-Composer' + #name : 'MicRichTextFormatConfigurationTest', + #superclass : 'TestCase', + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #helpers } +{ #category : 'helpers' } MicRichTextFormatConfigurationTest >> fontString [ ^ TextStyle defaultFont familyName,';72' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testBodyFont [ | richText | richText := Microdown asRichText: ' @@ -24,7 +26,7 @@ foo bar' copyReplaceAll: '$font$' with: self fontString). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testBullets [ | src richText | src := '{!richtext|bullets=◊»!} @@ -35,7 +37,7 @@ MicRichTextFormatConfigurationTest >> testBullets [ self assert: (richText asString includesSubstring: '» bbb') ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testChangingSameStyler [ | src richText | "Test that the same styler is changed" @@ -55,7 +57,7 @@ Header 2 last line' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testCounters [ | src richText | src := '{!richtext|counters=A1!} @@ -66,7 +68,7 @@ MicRichTextFormatConfigurationTest >> testCounters [ self assert: (richText asString includesSubstring: '1. bbb') ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testHeader1 [ | src richText | src := '{!richtext|headerFont1=$font$!} @@ -76,7 +78,7 @@ MicRichTextFormatConfigurationTest >> testHeader1 [ self assert: (richText asMorph height > 100). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testHeader2 [ | src richText | src := '{!richtext|headerFont2=$font$!} @@ -86,7 +88,7 @@ MicRichTextFormatConfigurationTest >> testHeader2 [ self assert: (richText asMorph height > 100). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testHeader3 [ | src richText | src := '{!richtext|headerFont3=$font$!} @@ -96,7 +98,7 @@ MicRichTextFormatConfigurationTest >> testHeader3 [ self assert: (richText asMorph height > 100). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testHeader4 [ | src richText | src := '{!richtext|headerFont4=$font$!} @@ -106,7 +108,7 @@ MicRichTextFormatConfigurationTest >> testHeader4 [ self assert: (richText asMorph height > 100). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testHeader5 [ | src richText | src := '{!richtext|headerFont5=$font$!} @@ -116,7 +118,7 @@ MicRichTextFormatConfigurationTest >> testHeader5 [ self assert: (richText asMorph height > 100). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testHeader6 [ | src richText | src := '{!richtext|headerFont6=$font$!} @@ -126,7 +128,7 @@ MicRichTextFormatConfigurationTest >> testHeader6 [ self assert: (richText asMorph height > 100). ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testIllegalArgument [ | src richText | src := '{!richtext|foo=bar!}'. @@ -134,7 +136,7 @@ MicRichTextFormatConfigurationTest >> testIllegalArgument [ self assert: richText asString equals: 'richtext annotation - unknown argument: foo' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testInterBlockSpacing [ | src richText | src := '{!richtext|interBlockSpacing=0!}fooo @@ -146,7 +148,7 @@ boo'. self assert: (richText asString lines size) equals: 3 ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testInterBlockSpacing_three [ | src richText | src := '{!richtext|interBlockSpacing=3!}fooo @@ -158,7 +160,7 @@ boo'. self assert: (richText asString lines size) equals: 7 ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testNewLineIfNotAlready [ | src richText | "newLineIfNotAlready mostely makes sense if interBlockSpacing is 0" @@ -172,7 +174,7 @@ bar'. bar' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextFormatConfigurationTest >> testSpaceAfterHeader [ | src richText | src := '{!richtext|crAfterHeader=2;2;1;1!} diff --git a/src/Microdown-RichTextComposer-Tests/MicRichTextLinkPresenterTest.class.st b/src/Microdown-RichTextComposer-Tests/MicRichTextLinkPresenterTest.class.st index a4fedbb9..1938fb87 100644 --- a/src/Microdown-RichTextComposer-Tests/MicRichTextLinkPresenterTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicRichTextLinkPresenterTest.class.st @@ -2,21 +2,23 @@ A MicRichTextLinkPresenterTest is a test class for testing the behavior of MicRichTextLinkPresenter " Class { - #name : #MicRichTextLinkPresenterTest, - #superclass : #TestCase, + #name : 'MicRichTextLinkPresenterTest', + #superclass : 'TestCase', #instVars : [ 'linkPresenter' ], - #category : #'Microdown-RichTextComposer-Tests-Composer' + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #running } +{ #category : 'running' } MicRichTextLinkPresenterTest >> setUp [ super setUp. linkPresenter := MicRichTextLinkPresenter new. ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextLinkPresenterTest >> testGuessKindOf [ "Testing default" | ref file | @@ -26,7 +28,7 @@ MicRichTextLinkPresenterTest >> testGuessKindOf [ self assert: (linkPresenter guessKindOf: ref) equals: 'md' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextLinkPresenterTest >> testGuessKindOf_html [ "Testing default" | ref file | @@ -36,7 +38,7 @@ MicRichTextLinkPresenterTest >> testGuessKindOf_html [ self assert: (linkPresenter guessKindOf: ref) equals: 'html' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextLinkPresenterTest >> testGuessKindOf_html_with_comment [ "Testing default" | ref file | @@ -48,7 +50,7 @@ MicRichTextLinkPresenterTest >> testGuessKindOf_html_with_comment [ self assert: (linkPresenter guessKindOf: ref) equals: 'html' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextLinkPresenterTest >> testGuessKindOf_withExtension [ "Testing default" | ref file | @@ -57,7 +59,7 @@ MicRichTextLinkPresenterTest >> testGuessKindOf_withExtension [ self assert: (linkPresenter guessKindOf: ref) equals: 'foo' ] -{ #category : #tests } +{ #category : 'tests' } MicRichTextLinkPresenterTest >> testPragmaForKind [ "Testing default" diff --git a/src/Microdown-RichTextComposer-Tests/MicRightAlignmentBlockTest.class.st b/src/Microdown-RichTextComposer-Tests/MicRightAlignmentBlockTest.class.st index cc591aab..3fdb680a 100644 --- a/src/Microdown-RichTextComposer-Tests/MicRightAlignmentBlockTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicRightAlignmentBlockTest.class.st @@ -2,12 +2,14 @@ A MicRightAllignmentBlockTest is a test class for testing the behavior of MicRightAllignmentBlock " Class { - #name : #MicRightAlignmentBlockTest, - #superclass : #TestCase, - #category : #'Microdown-RichTextComposer-Tests-BlockExtensions' + #name : 'MicRightAlignmentBlockTest', + #superclass : 'TestCase', + #category : 'Microdown-RichTextComposer-Tests-BlockExtensions', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'BlockExtensions' } -{ #category : #tests } +{ #category : 'tests' } MicRightAlignmentBlockTest >> testRightAlignment [ | src doc center | src := ' diff --git a/src/Microdown-RichTextComposer-Tests/MicTemplatingTest.class.st b/src/Microdown-RichTextComposer-Tests/MicTemplatingTest.class.st index 0128685d..e5e650b4 100644 --- a/src/Microdown-RichTextComposer-Tests/MicTemplatingTest.class.st +++ b/src/Microdown-RichTextComposer-Tests/MicTemplatingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #MicTemplatingTest, - #superclass : #TestCase, - #category : #'Microdown-RichTextComposer-Tests-Composer' + #name : 'MicTemplatingTest', + #superclass : 'TestCase', + #category : 'Microdown-RichTextComposer-Tests-Composer', + #package : 'Microdown-RichTextComposer-Tests', + #tag : 'Composer' } -{ #category : #tests } +{ #category : 'tests' } MicTemplatingTest >> testBaselineWithoutBaselineMethodShouldNotBreak [ diff --git a/src/Microdown-RichTextComposer-Tests/package.st b/src/Microdown-RichTextComposer-Tests/package.st index 15cd0f58..26637086 100644 --- a/src/Microdown-RichTextComposer-Tests/package.st +++ b/src/Microdown-RichTextComposer-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-RichTextComposer-Tests' } +Package { #name : 'Microdown-RichTextComposer-Tests' } diff --git a/src/Microdown-Slide-Utils/MicPillarSlideConverter.class.st b/src/Microdown-Slide-Utils/MicPillarSlideConverter.class.st index 376115bc..ee7e9796 100644 --- a/src/Microdown-Slide-Utils/MicPillarSlideConverter.class.st +++ b/src/Microdown-Slide-Utils/MicPillarSlideConverter.class.st @@ -1,10 +1,11 @@ Class { - #name : #MicPillarSlideConverter, - #superclass : #Object, - #category : #'Microdown-Slide-Utils' + #name : 'MicPillarSlideConverter', + #superclass : 'Object', + #category : 'Microdown-Slide-Utils', + #package : 'Microdown-Slide-Utils' } -{ #category : #operations } +{ #category : 'operations' } MicPillarSlideConverter >> convert: aString [ | pillar mic | @@ -15,7 +16,7 @@ MicPillarSlideConverter >> convert: aString [ ^ mic ] -{ #category : #parsing } +{ #category : 'parsing' } MicPillarSlideConverter >> parse: aString [ ^ PRPillarParser parse: aString diff --git a/src/Microdown-Slide-Utils/MicPillarSlideConverterTest.class.st b/src/Microdown-Slide-Utils/MicPillarSlideConverterTest.class.st index e603ad67..2f380c82 100644 --- a/src/Microdown-Slide-Utils/MicPillarSlideConverterTest.class.st +++ b/src/Microdown-Slide-Utils/MicPillarSlideConverterTest.class.st @@ -1,16 +1,17 @@ Class { - #name : #MicPillarSlideConverterTest, - #superclass : #TestCase, - #category : #'Microdown-Slide-Utils' + #name : 'MicPillarSlideConverterTest', + #superclass : 'TestCase', + #category : 'Microdown-Slide-Utils', + #package : 'Microdown-Slide-Utils' } -{ #category : #parsing } +{ #category : 'parsing' } MicPillarSlideConverterTest >> parse: aString [ ^ PRPillarParser parse: aString ] -{ #category : #parsing } +{ #category : 'parsing' } MicPillarSlideConverterTest >> testConvertParagraphSlide [ | converter res | @@ -22,7 +23,7 @@ This is a paragraph. self assert: res children first class equals: MicSlideBlock ] -{ #category : #parsing } +{ #category : 'parsing' } MicPillarSlideConverterTest >> testConvertSlide [ | converter res | diff --git a/src/Microdown-Slide-Utils/MicSlideConverter.class.st b/src/Microdown-Slide-Utils/MicSlideConverter.class.st index 5d18ed13..3cc76331 100644 --- a/src/Microdown-Slide-Utils/MicSlideConverter.class.st +++ b/src/Microdown-Slide-Utils/MicSlideConverter.class.st @@ -1,13 +1,14 @@ Class { - #name : #MicSlideConverter, - #superclass : #PRVisitor, + #name : 'MicSlideConverter', + #superclass : 'PRVisitor', #instVars : [ 'mic' ], - #category : #'Microdown-Slide-Utils' + #category : 'Microdown-Slide-Utils', + #package : 'Microdown-Slide-Utils' } -{ #category : #visiting } +{ #category : 'visiting' } MicSlideConverter >> start: aPRDocument [ mic := MicRootBlock new. super start: aPRDocument. @@ -16,7 +17,7 @@ MicSlideConverter >> start: aPRDocument [ ] -{ #category : #visiting } +{ #category : 'visiting' } MicSlideConverter >> visitSlide: aSlide [ diff --git a/src/Microdown-Slide-Utils/package.st b/src/Microdown-Slide-Utils/package.st index adcb9a44..b2bcb72b 100644 --- a/src/Microdown-Slide-Utils/package.st +++ b/src/Microdown-Slide-Utils/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Slide-Utils' } +Package { #name : 'Microdown-Slide-Utils' } diff --git a/src/Microdown-Templated/MicAbstractOutputDocumentMaker.class.st b/src/Microdown-Templated/MicAbstractOutputDocumentMaker.class.st index b195e078..4c425384 100644 --- a/src/Microdown-Templated/MicAbstractOutputDocumentMaker.class.st +++ b/src/Microdown-Templated/MicAbstractOutputDocumentMaker.class.st @@ -3,38 +3,39 @@ I represent the way to produce an output document (LaTex,....) I often compose a visitor and some unix scripts + some folders for storing resources. " Class { - #name : #MicAbstractOutputDocumentMaker, - #superclass : #Object, + #name : 'MicAbstractOutputDocumentMaker', + #superclass : 'Object', #instVars : [ 'baseDirectory' ], - #category : #'Microdown-Templated' + #category : 'Microdown-Templated', + #package : 'Microdown-Templated' } -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractOutputDocumentMaker >> baseDirectory [ ^ baseDirectory ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractOutputDocumentMaker >> baseDirectory: anObject [ baseDirectory := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractOutputDocumentMaker >> basicWriter [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractOutputDocumentMaker >> templateDirectory [ ^ self baseDirectory / '_support' / 'templates' / self writer folderName ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractOutputDocumentMaker >> writer [ | writer | diff --git a/src/Microdown-Templated/MicLaTeXMaker.class.st b/src/Microdown-Templated/MicLaTeXMaker.class.st index a29c0247..ea0f790b 100644 --- a/src/Microdown-Templated/MicLaTeXMaker.class.st +++ b/src/Microdown-Templated/MicLaTeXMaker.class.st @@ -1,16 +1,17 @@ Class { - #name : #MicLaTeXMaker, - #superclass : #MicAbstractOutputDocumentMaker, - #category : #'Microdown-Templated' + #name : 'MicLaTeXMaker', + #superclass : 'MicAbstractOutputDocumentMaker', + #category : 'Microdown-Templated', + #package : 'Microdown-Templated' } -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXMaker >> basicWriter [ ^ MicLaTeXWriter new ] -{ #category : #accessing } +{ #category : 'accessing' } MicLaTeXMaker >> extension [ ^ 'tex' diff --git a/src/Microdown-Templated/MicTemplatedWriter.class.st b/src/Microdown-Templated/MicTemplatedWriter.class.st index 92fc1e67..7ae2fcad 100644 --- a/src/Microdown-Templated/MicTemplatedWriter.class.st +++ b/src/Microdown-Templated/MicTemplatedWriter.class.st @@ -6,367 +6,368 @@ Otherwise I simply delegate the writing to the wrapped one. I am carefully designed so if an element X is delegated to the wrapped writer, it should delegate the writing of X's children back to myself. " Class { - #name : #MicTemplatedWriter, - #superclass : #MicrodownVisitor, + #name : 'MicTemplatedWriter', + #superclass : 'MicrodownVisitor', #instVars : [ 'outputDocument', 'defaultWriter', 'environmentStack' ], - #category : #'Microdown-Templated' + #category : 'Microdown-Templated', + #package : 'Microdown-Templated' } -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> anchorTemplateFileName [ ^ 'anchor.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> boldTemplateFileName [ ^ 'bold.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> codeBlockTemplateFileName [ ^ 'codeBlock.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> commentedLineTemplateFileName [ ^ 'commentedLine.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> dataItemTemplateFileName [ ^ 'dataItem.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> defaultAnnotatedParagraphTemplateFileName [ ^ 'defaultAnnotatedParagraph.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> definitionListTemplateFileName [ ^ 'definitionList.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> emptyParagraphTemplateFileName [ ^ 'emptyParagraph.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> externalLinkTemplateFileName [ ^ 'externalLink.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> figureTemplateFileName [ ^ 'figure.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> headerTemplateFileName [ ^ 'header.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> horizontalRuleTemplateFileName [ ^ 'horizontalRule.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> internalLinkTemplateFileName [ ^ 'internalLink.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> italicTemplateFileName [ ^ 'italic.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> lineBreakTemplateFileName [ ^ 'lineBreak.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> listItemTemplateFileName [ ^ 'listItem.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> mailLinkTemplateFileName [ ^ 'mailLink.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> monospaceTemplateFileName [ ^ 'monospace.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> orderedListTemplateFileName [ ^ 'orderedList.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> paragraphTemplateFileName [ ^ 'paragraph.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> preformattedTemplateFileName [ ^ 'preformatted.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> sectionTemplateFileName [ ^ 'section.mustache' ] -{ #category : #templates } +{ #category : 'templates' } MicTemplatedWriter class >> unorderedListTemplateFileName [ ^ 'unorderedList.mustache' ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter class >> writerName [ ^ #templatedWriter ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> anchorTemplateFileName [ ^ self class anchorTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> boldTemplateFileName [ ^ self class boldTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> codeBlockTemplateFileName [ ^ self class codeBlockTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> commentedLineTemplateFileName [ ^ self class commentedLineTemplateFileName ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter >> contents [ ^ defaultWriter contents ] -{ #category : #environment } +{ #category : 'environment' } MicTemplatedWriter >> currentEnvironmentPath [ ^ RelativePath withAll: (environmentStack collect: [:each | each name]) reversed ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> dataItemTemplateFileName [ ^ self class dataItemTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> defaultAnnotatedParagraphTemplateFileName [ ^ self class defaultAnnotatedParagraphTemplateFileName ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter >> defaultWriter [ ^ defaultWriter ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter >> defaultWriter: anObject [ defaultWriter := anObject ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> definitionListTemplateFileName [ ^ self class definitionListTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> emptyParagraphTemplateFileName [ ^ self class emptyParagraphTemplateFileName ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter >> environmentStack: aCollection [ environmentStack := aCollection ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> externalLinkTemplateFileName [ ^ self class externalLinkTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> figureTemplateFileName [ ^ self class figureTemplateFileName ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter >> folderName [ ^ defaultWriter folderName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> headerTemplateFileName [ ^ self class headerTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> horizontalRuleTemplateFileName [ ^ self class horizontalRuleTemplateFileName ] -{ #category : #initialization } +{ #category : 'initialization' } MicTemplatedWriter >> initialize [ super initialize. environmentStack := OrderedCollection new. ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> internalLinkTemplateFileName [ ^ self class internalLinkTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> italicTemplateFileName [ ^ self class italicTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> lineBreakTemplateFileName [ ^ self class lineBreakTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> listItemTemplateFileName [ ^ self class listItemTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> mailLinkTemplateFileName [ ^ self class mailLinkTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> monospaceTemplateFileName [ ^ self class monospaceTemplateFileName ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> orderedListTemplateFileName [ ^ self class orderedListTemplateFileName ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter >> outputDocument [ ^ outputDocument ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter >> outputDocument: anObject [ outputDocument := anObject ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> paragraphTemplateFileName [ ^ self class paragraphTemplateFileName ] -{ #category : #environment } +{ #category : 'environment' } MicTemplatedWriter >> popEnvironment [ environmentStack removeFirst ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> preformattedTemplateFileName [ ^ self class preformattedTemplateFileName ] -{ #category : #environment } +{ #category : 'environment' } MicTemplatedWriter >> pushEnvironment: aPREnvironment [ environmentStack addFirst: aPREnvironment ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> sectionTemplateFileName [ ^ self class sectionTemplateFileName ] -{ #category : #accessing } +{ #category : 'accessing' } MicTemplatedWriter >> templateForConfiguration: aConfiguration [ ^ defaultWriter templateForConfiguration: aConfiguration ] -{ #category : #'accessing - templates' } +{ #category : 'accessing - templates' } MicTemplatedWriter >> unorderedListTemplateFileName [ ^ self class unorderedListTemplateFileName ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitAnchor: aPRAnchor [ self @@ -376,7 +377,7 @@ MicTemplatedWriter >> visitAnchor: aPRAnchor [ ifAbsent: [ defaultWriter visitAnchor: aPRAnchor ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitAnnotatedParagraph: anAnnotatedParagraph [ | arguments | @@ -393,7 +394,7 @@ MicTemplatedWriter >> visitAnnotatedParagraph: anAnnotatedParagraph [ ifAbsent: [ defaultWriter visitAnnotatedParagraph: anAnnotatedParagraph ] ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitBoldFormat: aPRBoldFormat [ self @@ -402,7 +403,7 @@ MicTemplatedWriter >> visitBoldFormat: aPRBoldFormat [ ifAbsent: [ defaultWriter visitBoldFormat: aPRBoldFormat ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitCodeblock: aPRCodeblock [ self @@ -412,7 +413,7 @@ MicTemplatedWriter >> visitCodeblock: aPRCodeblock [ ifAbsent: [ defaultWriter visitCodeblock: aPRCodeblock ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitCommentedLine: aPRText [ self @@ -421,7 +422,7 @@ MicTemplatedWriter >> visitCommentedLine: aPRText [ ifAbsent: [ defaultWriter visitCommentedLine: aPRText ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitDataItem: aPRListItem [ self @@ -430,7 +431,7 @@ MicTemplatedWriter >> visitDataItem: aPRListItem [ ifAbsent: [ defaultWriter visitDataItem: aPRListItem ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitDefinitionList: aPRList [ self @@ -439,7 +440,7 @@ MicTemplatedWriter >> visitDefinitionList: aPRList [ ifAbsent: [ defaultWriter visitDefinitionList: aPRList ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitEmptyParagraph: anEmptyParagraph [ self @@ -448,7 +449,7 @@ MicTemplatedWriter >> visitEmptyParagraph: anEmptyParagraph [ ifAbsent: [ defaultWriter visitEmptyParagraph: anEmptyParagraph ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitEnvironment: anEnvironment [ self pushEnvironment: anEnvironment. @@ -460,7 +461,7 @@ MicTemplatedWriter >> visitEnvironment: anEnvironment [ self popEnvironment. ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitExternalLink: aPRExternalLink [ self @@ -470,7 +471,7 @@ MicTemplatedWriter >> visitExternalLink: aPRExternalLink [ ifAbsent: [ defaultWriter visitExternalLink: aPRExternalLink ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitFigure: aFigure [ self @@ -482,7 +483,7 @@ MicTemplatedWriter >> visitFigure: aFigure [ ifAbsent: [ defaultWriter visitFigure: aFigure ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitHeader: aHeader [ self @@ -492,7 +493,7 @@ MicTemplatedWriter >> visitHeader: aHeader [ ifAbsent: [ defaultWriter visitHeader: aHeader ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitHorizontalRule: aPRHorizontalRule [ self @@ -501,7 +502,7 @@ MicTemplatedWriter >> visitHorizontalRule: aPRHorizontalRule [ ifAbsent: [ defaultWriter visitHorizontalRule: aPRHorizontalRule ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitInternalLink: aPRInternalLink [ self @@ -511,7 +512,7 @@ MicTemplatedWriter >> visitInternalLink: aPRInternalLink [ ifAbsent: [ defaultWriter visitInternalLink: aPRInternalLink ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitItalicFormat: aPRItalicFormat [ self @@ -520,7 +521,7 @@ MicTemplatedWriter >> visitItalicFormat: aPRItalicFormat [ ifAbsent: [ defaultWriter visitItalicFormat: aPRItalicFormat ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitLineBreak: aPRLineBreak [ self @@ -529,7 +530,7 @@ MicTemplatedWriter >> visitLineBreak: aPRLineBreak [ ifAbsent: [ defaultWriter visitLineBreak: aPRLineBreak ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitListItem: aPRListItem [ self @@ -538,7 +539,7 @@ MicTemplatedWriter >> visitListItem: aPRListItem [ ifAbsent: [ defaultWriter visitListItem: aPRListItem ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitMailLink: aPRMailLink [ self @@ -548,7 +549,7 @@ MicTemplatedWriter >> visitMailLink: aPRMailLink [ ifAbsent: [ defaultWriter visitExternalLink: aPRMailLink ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitMonospaceFormat: aPRMonospaceFormat [ self @@ -557,7 +558,7 @@ MicTemplatedWriter >> visitMonospaceFormat: aPRMonospaceFormat [ ifAbsent: [ defaultWriter visitMonospaceFormat: aPRMonospaceFormat ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitOrderedList: aPROrderedList [ self @@ -566,7 +567,7 @@ MicTemplatedWriter >> visitOrderedList: aPROrderedList [ ifAbsent: [ defaultWriter visitOrderedList: aPROrderedList ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitParagraph: aParagraph [ self @@ -575,7 +576,7 @@ MicTemplatedWriter >> visitParagraph: aParagraph [ ifAbsent: [ defaultWriter visitParagraph: aParagraph ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitPreformatted: aPRPreformatted [ self @@ -584,13 +585,13 @@ MicTemplatedWriter >> visitPreformatted: aPRPreformatted [ ifAbsent: [ defaultWriter visitPreformatted: aPRPreformatted ] ] -{ #category : #delegating } +{ #category : 'delegating' } MicTemplatedWriter >> visitRaw: aPRRaw [ defaultWriter visitRaw: aPRRaw ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitSection: aPRSection [ self @@ -599,13 +600,13 @@ MicTemplatedWriter >> visitSection: aPRSection [ ifAbsent: [ defaultWriter visitSection: aPRSection ] ] -{ #category : #delegating } +{ #category : 'delegating' } MicTemplatedWriter >> visitText: aPRText [ defaultWriter visitText: aPRText ] -{ #category : #visiting } +{ #category : 'visiting' } MicTemplatedWriter >> visitUnorderedList: aPRUnorderedList [ self @@ -614,14 +615,14 @@ MicTemplatedWriter >> visitUnorderedList: aPRUnorderedList [ ifAbsent: [ defaultWriter visitUnorderedList: aPRUnorderedList ] ] -{ #category : #writing } +{ #category : 'writing' } MicTemplatedWriter >> write: aMicElement [ aMicElement accept: self. ^ defaultWriter contents ] -{ #category : #writing } +{ #category : 'writing' } MicTemplatedWriter >> write: aMicElement withTemplateFileName: templateFileName extraArguments: arguments @@ -638,7 +639,7 @@ MicTemplatedWriter >> write: aMicElement ifAbsent: aBlock ] -{ #category : #writing } +{ #category : 'writing' } MicTemplatedWriter >> write: aDocumentItem withTemplateFileName: templateFileName ifAbsent: aBlock [ self @@ -648,7 +649,7 @@ MicTemplatedWriter >> write: aDocumentItem withTemplateFileName: templateFileNam ifAbsent: aBlock ] -{ #category : #writing } +{ #category : 'writing' } MicTemplatedWriter >> writeRawText: aText withTemplateFileName: templateFileName extraArguments: arguments ifAbsent: aBlock [ | templateFile result environmentPath foundPath | @@ -664,7 +665,7 @@ MicTemplatedWriter >> writeRawText: aText withTemplateFileName: templateFileName self visitRaw: (PRRaw content: result type: defaultWriter writerName) ] -{ #category : #writing } +{ #category : 'writing' } MicTemplatedWriter >> writeRawText: aText withTemplateFileName: templateFileName ifAbsent: aBlock [ ^ self diff --git a/src/Microdown-Templated/MicTemplatedWriterTest.class.st b/src/Microdown-Templated/MicTemplatedWriterTest.class.st index 0aab3d50..911336ae 100644 --- a/src/Microdown-Templated/MicTemplatedWriterTest.class.st +++ b/src/Microdown-Templated/MicTemplatedWriterTest.class.st @@ -1,26 +1,27 @@ Class { - #name : #MicTemplatedWriterTest, - #superclass : #TestCase, + #name : 'MicTemplatedWriterTest', + #superclass : 'TestCase', #instVars : [ 'textDocument' ], - #category : #'Microdown-Templated' + #category : 'Microdown-Templated', + #package : 'Microdown-Templated' } -{ #category : #helpers } +{ #category : 'helpers' } MicTemplatedWriterTest >> assertTemplate: template writesValue: value forNode: node [ self assertTemplatePath: Path * template writesValue: value forNode: node ] -{ #category : #helpers } +{ #category : 'helpers' } MicTemplatedWriterTest >> assertTemplatePath: templatePath writesValue: contents forNode: node [ self createTemplateFileAt: templatePath withContents: contents. self assertWritingNode: node writes: contents. ] -{ #category : #helpers } +{ #category : 'helpers' } MicTemplatedWriterTest >> assertWritingNode: node writes: contents [ | document result | @@ -33,7 +34,7 @@ MicTemplatedWriterTest >> assertWritingNode: node writes: contents [ self assert: result equals: contents ] -{ #category : #helpers } +{ #category : 'helpers' } MicTemplatedWriterTest >> createTemplateFileAt: aPath withContents: contents [ | templateFileReference | @@ -42,7 +43,7 @@ MicTemplatedWriterTest >> createTemplateFileAt: aPath withContents: contents [ templateFileReference writeStreamDo: [ :stream | stream nextPutAll: contents ]. ] -{ #category : #running } +{ #category : 'running' } MicTemplatedWriterTest >> setUp [ super setUp. @@ -51,7 +52,7 @@ MicTemplatedWriterTest >> setUp [ yourself. ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteAnchorUsesAnchorTemplate [ self @@ -60,7 +61,7 @@ MicTemplatedWriterTest >> testWriteAnchorUsesAnchorTemplate [ forNode: (PRAnnotatedParagraph withAll: #() annotation: 'todo') ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteAnchorUsesDefaultIfNotSpecificIsDefinedTemplate [ self @@ -69,7 +70,7 @@ MicTemplatedWriterTest >> testWriteAnchorUsesDefaultIfNotSpecificIsDefinedTempla forNode: (PRAnnotatedParagraph withAll: #() annotation: 'todo') ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteBoldUsesBoldTemplate [ self @@ -78,7 +79,7 @@ MicTemplatedWriterTest >> testWriteBoldUsesBoldTemplate [ forNode: (MicBoldFormatBlock new children: { MicTextBlock new substring: 'Bar'}) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteCodeBlockUsesCodeBlockTemplate [ self @@ -87,7 +88,7 @@ MicTemplatedWriterTest >> testWriteCodeBlockUsesCodeBlockTemplate [ forNode: (PRCodeblock content: '^ self') ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteCommentedLineUsesCommentedLineTemplate [ self @@ -96,7 +97,7 @@ MicTemplatedWriterTest >> testWriteCommentedLineUsesCommentedLineTemplate [ forNode: (PRCommentedLine content: 'some comment') ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteDataItemUsesDataItemTemplate [ self @@ -105,7 +106,7 @@ MicTemplatedWriterTest >> testWriteDataItemUsesDataItemTemplate [ forNode: PRDataItem new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteDefinitionListUsesDefinitionListTemplate [ self @@ -114,7 +115,7 @@ MicTemplatedWriterTest >> testWriteDefinitionListUsesDefinitionListTemplate [ forNode: PRDefinitionList new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteEmptyParagraphsUsesEmptyParagraphTemplate [ self @@ -123,7 +124,7 @@ MicTemplatedWriterTest >> testWriteEmptyParagraphsUsesEmptyParagraphTemplate [ forNode: PREmptyParagraph new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteEnvironmentItselfUsesMainTemplate [ self @@ -136,7 +137,7 @@ MicTemplatedWriterTest >> testWriteEnvironmentItselfUsesMainTemplate [ yourself) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteEnvironmentUsesArguments [ self @@ -150,7 +151,7 @@ MicTemplatedWriterTest >> testWriteEnvironmentUsesArguments [ writes: 'before test after' ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteExternalLinkUsesExternalLinkTemplate [ self @@ -159,7 +160,7 @@ MicTemplatedWriterTest >> testWriteExternalLinkUsesExternalLinkTemplate [ forNode: (PRExternalLink new reference: 'http://pharo.org') ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteFigureUsesFigureTemplate [ self @@ -168,7 +169,7 @@ MicTemplatedWriterTest >> testWriteFigureUsesFigureTemplate [ forNode: (PRFigure reference: 'bla.png') ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteHeaderUsesHeaderTemplate [ self @@ -179,7 +180,7 @@ MicTemplatedWriterTest >> testWriteHeaderUsesHeaderTemplate [ add: (PRText content: 'foo')) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteHorizontalRuleUsesHorizontalRuleTemplate [ self @@ -188,7 +189,7 @@ MicTemplatedWriterTest >> testWriteHorizontalRuleUsesHorizontalRuleTemplate [ forNode: PRHorizontalRule new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteInternalLinkUsesInternalLinkTemplate [ self @@ -197,7 +198,7 @@ MicTemplatedWriterTest >> testWriteInternalLinkUsesInternalLinkTemplate [ forNode: (PRInternalLink new reference: 'bla.pillar') ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteItalicUsesItalicTemplate [ self @@ -206,7 +207,7 @@ MicTemplatedWriterTest >> testWriteItalicUsesItalicTemplate [ forNode: (PRItalicFormat with: (PRText content: 'Bar')) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteLineBreakUsesLineBreakTemplate [ self @@ -215,7 +216,7 @@ MicTemplatedWriterTest >> testWriteLineBreakUsesLineBreakTemplate [ forNode: PRLineBreak new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteListItemUsesListItemTemplate [ self @@ -224,7 +225,7 @@ MicTemplatedWriterTest >> testWriteListItemUsesListItemTemplate [ forNode: PRListItem new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteMailLinkUsesMailLinkTemplate [ self @@ -233,7 +234,7 @@ MicTemplatedWriterTest >> testWriteMailLinkUsesMailLinkTemplate [ forNode: (PRMailLink reference: 'foo@bar.com') ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteMonospaceUsesMonospaceTemplate [ self @@ -242,7 +243,7 @@ MicTemplatedWriterTest >> testWriteMonospaceUsesMonospaceTemplate [ forNode: (PRMonospaceFormat with: (PRText content: 'Bar')) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteNestedEnvironmentItselfUsesMainTemplate [ self @@ -255,7 +256,7 @@ MicTemplatedWriterTest >> testWriteNestedEnvironmentItselfUsesMainTemplate [ yourself) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteNestedEnvironmentWithChilds [ self @@ -275,7 +276,7 @@ MicTemplatedWriterTest >> testWriteNestedEnvironmentWithChilds [ yourself) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteOrderedListUsesOrderedListTemplate [ self @@ -284,7 +285,7 @@ MicTemplatedWriterTest >> testWriteOrderedListUsesOrderedListTemplate [ forNode: PROrderedList new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteParagraphUsesParagraphTemplate [ self @@ -293,7 +294,7 @@ MicTemplatedWriterTest >> testWriteParagraphUsesParagraphTemplate [ forNode: PRParagraph new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWritePreformattedUsesPreformattedTemplate [ self @@ -302,7 +303,7 @@ MicTemplatedWriterTest >> testWritePreformattedUsesPreformattedTemplate [ forNode: (PRPreformatted with: (PRText content: 'Bar')) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteSectionUsesSectionTemplate [ self @@ -311,7 +312,7 @@ MicTemplatedWriterTest >> testWriteSectionUsesSectionTemplate [ forNode: PRSection new ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteTextInsideEnvironmentLooksUpOutsideEnvironment [ self @@ -324,7 +325,7 @@ MicTemplatedWriterTest >> testWriteTextInsideEnvironmentLooksUpOutsideEnvironmen yourself) ] -{ #category : #'tests-templatefiles' } +{ #category : 'tests-templatefiles' } MicTemplatedWriterTest >> testWriteTextInsideEnvironmentUsesTemplateInsideEnvironment [ self diff --git a/src/Microdown-Templated/MicTextDocumentMaker.class.st b/src/Microdown-Templated/MicTextDocumentMaker.class.st index 814f4490..6e4113bf 100644 --- a/src/Microdown-Templated/MicTextDocumentMaker.class.st +++ b/src/Microdown-Templated/MicTextDocumentMaker.class.st @@ -1,16 +1,17 @@ Class { - #name : #MicTextDocumentMaker, - #superclass : #MicAbstractOutputDocumentMaker, - #category : #'Microdown-Templated' + #name : 'MicTextDocumentMaker', + #superclass : 'MicAbstractOutputDocumentMaker', + #category : 'Microdown-Templated', + #package : 'Microdown-Templated' } -{ #category : #accessing } +{ #category : 'accessing' } MicTextDocumentMaker >> basicWriter [ ^ MicTextualMicrodownExporter new ] -{ #category : #accessing } +{ #category : 'accessing' } MicTextDocumentMaker >> extension [ ^ 'md' diff --git a/src/Microdown-Templated/package.st b/src/Microdown-Templated/package.st index 1e2865ab..a1e94f09 100644 --- a/src/Microdown-Templated/package.st +++ b/src/Microdown-Templated/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Templated' } +Package { #name : 'Microdown-Templated' } diff --git a/src/Microdown-Tests/ManifestMicrodownTests.class.st b/src/Microdown-Tests/ManifestMicrodownTests.class.st index 33cf3caa..2b339e05 100644 --- a/src/Microdown-Tests/ManifestMicrodownTests.class.st +++ b/src/Microdown-Tests/ManifestMicrodownTests.class.st @@ -2,7 +2,9 @@ I have test for the core classes of Microdown. " Class { - #name : #ManifestMicrodownTests, - #superclass : #PackageManifest, - #category : #'Microdown-Tests-Manifest' + #name : 'ManifestMicrodownTests', + #superclass : 'PackageManifest', + #category : 'Microdown-Tests-Manifest', + #package : 'Microdown-Tests', + #tag : 'Manifest' } diff --git a/src/Microdown-Tests/MicAnchorBlockTest.class.st b/src/Microdown-Tests/MicAnchorBlockTest.class.st index bee67de7..b1769227 100644 --- a/src/Microdown-Tests/MicAnchorBlockTest.class.st +++ b/src/Microdown-Tests/MicAnchorBlockTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicAnchorBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicAnchorBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicAnchorBlockTest >> subjectClass [ ^ MicAnchorBlock ] -{ #category : #tests } +{ #category : 'tests' } MicAnchorBlockTest >> testModifyLabel [ | mic | mic := (parser parse: '@label') children first. diff --git a/src/Microdown-Tests/MicAnchorLinkerTest.class.st b/src/Microdown-Tests/MicAnchorLinkerTest.class.st index 2665bfa7..2ec4da6e 100644 --- a/src/Microdown-Tests/MicAnchorLinkerTest.class.st +++ b/src/Microdown-Tests/MicAnchorLinkerTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #MicAnchorLinkerTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Parser' + #name : 'MicAnchorLinkerTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicAnchorLinkerTest >> testAnchorIsAttachedToItsTarget [ | linker doc | linker := MicAnchorLinker new. @@ -20,7 +22,7 @@ this is a sentence ] -{ #category : #tests } +{ #category : 'tests' } MicAnchorLinkerTest >> testAnchorIsAttachedToItsTarget2 [ | linker doc | linker := MicAnchorLinker new. @@ -38,7 +40,7 @@ this is a sentence ] -{ #category : #tests } +{ #category : 'tests' } MicAnchorLinkerTest >> testHeaderLast [ | linker doc | linker := MicAnchorLinker new. diff --git a/src/Microdown-Tests/MicAnnotationSubclassTest.class.st b/src/Microdown-Tests/MicAnnotationSubclassTest.class.st index 7c7683ad..2aaef0ea 100644 --- a/src/Microdown-Tests/MicAnnotationSubclassTest.class.st +++ b/src/Microdown-Tests/MicAnnotationSubclassTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #MicAnnotationSubclassTest, - #superclass : #TestCase, + #name : 'MicAnnotationSubclassTest', + #superclass : 'TestCase', #instVars : [ 'parser' ], - #category : #'Microdown-Tests-Extensions' + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #running } +{ #category : 'running' } MicAnnotationSubclassTest >> setUp [ super setUp. parser := Microdown new diff --git a/src/Microdown-Tests/MicArgumentsSplitterTest.class.st b/src/Microdown-Tests/MicArgumentsSplitterTest.class.st index 3a0d99f6..9936bdd3 100644 --- a/src/Microdown-Tests/MicArgumentsSplitterTest.class.st +++ b/src/Microdown-Tests/MicArgumentsSplitterTest.class.st @@ -2,36 +2,38 @@ A MicArgumentsSplitterTest is a test class for testing the behavior of MicArgumentsSplitter " Class { - #name : #MicArgumentsSplitterTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Parser' + #name : 'MicArgumentsSplitterTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #helpers } +{ #category : 'helpers' } MicArgumentsSplitterTest >> splitter [ ^ MicArgumentList ] -{ #category : #helpers } +{ #category : 'helpers' } MicArgumentsSplitterTest >> subjectUnderTestWith: aString [ ^ MicArgumentList withString: aString ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testArguments [ | subject | subject := self subjectUnderTestWith: 'foo=bar'. self assert: (subject at: #foo) equals: 'bar' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testCanInstantiate [ | subject | subject := self subjectUnderTestWith: 'bla'. self assert: (subject isNotNil) ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testDefaultWithEmptyInput [ | subject | subject := self splitter split: '' defaultArg: #language defaultValue: 'smalltalk'. @@ -41,7 +43,7 @@ MicArgumentsSplitterTest >> testDefaultWithEmptyInput [ self deny: subject hasNonDefaultArguments ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testDefaultWithNoValue [ | subject | subject := self splitter split: 'pharo' defaultArg: #language. @@ -50,7 +52,7 @@ MicArgumentsSplitterTest >> testDefaultWithNoValue [ self assert: (subject at: #language) equals: 'pharo' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testDefaultWithValue [ | subject | subject := self splitter split: 'pharo' defaultArg: #language defaultValue: #smalltalk. @@ -59,28 +61,28 @@ MicArgumentsSplitterTest >> testDefaultWithValue [ self assert: (subject at: #language) equals: 'pharo' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testEmpty [ | subject | subject := self subjectUnderTestWith: ''. self assert: subject size equals: 0. ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testFirstTag [ | subject | subject := self subjectUnderTestWith: 'bla'. self assert: (subject defaultValue) equals: 'bla' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testFirstTagWithDelimiter [ | subject | subject := self subjectUnderTestWith: 'foo|bar=99'. self assert: (subject defaultValue) equals: 'foo' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testHasNonDefaultArguments [ | subject | subject := self splitter split: '' defaultArg: #language. @@ -88,14 +90,14 @@ MicArgumentsSplitterTest >> testHasNonDefaultArguments [ self assert: subject hasNonDefaultArguments ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testHasNonDefaultArguments_no [ | subject | subject := self splitter split: '' defaultArg: #language. self deny: subject hasNonDefaultArguments ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testHasNonDefaultArguments_nonDefault [ | subject | subject := self splitter split: '' defaultArg: #language defaultValue: 'Pharo'. @@ -103,42 +105,42 @@ MicArgumentsSplitterTest >> testHasNonDefaultArguments_nonDefault [ self assert: subject hasNonDefaultArguments ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testHasNonDefaultValue [ | subject | subject := self splitter split: 'fortran' defaultArg: #language. self assert: subject hasNonDefaultValue ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testHasNonDefaultValue_AndSomeArgs [ | subject | subject := self splitter split: 'fortran|wasOnce=cool' defaultArg: #language. self assert: subject hasNonDefaultValue ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testHasNonDefaultValue_Default [ | subject | subject := self splitter split: '' defaultArg: #language defaultValue: 'pharo'. self deny: subject hasNonDefaultValue ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testHasNonDefaultValue_DefaultOverridden [ | subject | subject := self splitter split: 'fortran' defaultArg: #language defaultValue: 'pharo'. self assert: subject hasNonDefaultValue ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testHasNonDefaultValue_NoDefault [ | subject | subject := self splitter split: '' defaultArg: #language. self deny: subject hasNonDefaultValue ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testJustTheArguments [ | subject input | input := 'joe|foo=bar&aaa=bbb ccc&pip='. @@ -146,7 +148,7 @@ MicArgumentsSplitterTest >> testJustTheArguments [ self assert: subject justTheArguments printString equals: 'foo=bar&aaa=bbb ccc&pip=' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testJustTheArguments_NoDefault [ | subject input | input := 'foo=bar&aaa=bbb ccc&pip='. @@ -154,7 +156,7 @@ MicArgumentsSplitterTest >> testJustTheArguments_NoDefault [ self assert: subject justTheArguments printString equals: 'foo=bar&aaa=bbb ccc&pip=' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testNameAndArguments [ | subject | subject := self subjectUnderTestWith: 'aName|foo=bar'. @@ -162,14 +164,14 @@ MicArgumentsSplitterTest >> testNameAndArguments [ self assert: subject defaultValue equals: 'aName'. ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testNameWithDelimiter [ | subject | subject := self subjectUnderTestWith: 'fooName|bar=foe'. self assert: (subject defaultValue) equals: 'fooName' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testPrintString [ | subject input | input := 'joe|foo=bar&aaa=bbb ccc&pip='. @@ -177,7 +179,7 @@ MicArgumentsSplitterTest >> testPrintString [ self assert: subject printString equals: input ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testPrintString_AssignDefaultUsingEquals [ | subject input | input := 'language=fortran'. @@ -185,7 +187,7 @@ MicArgumentsSplitterTest >> testPrintString_AssignDefaultUsingEquals [ self assert: subject printString equals: 'fortran' ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testPrintString_Empty [ | subject input | input := ''. @@ -193,7 +195,7 @@ MicArgumentsSplitterTest >> testPrintString_Empty [ self assert: subject printString equals: input ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testPrintString_defaultValue [ | subject input | input := 'foo'. @@ -201,7 +203,7 @@ MicArgumentsSplitterTest >> testPrintString_defaultValue [ self assert: subject printString equals: input ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testPrintString_oneParam [ | subject input | input := 'foo=bar'. @@ -209,7 +211,7 @@ MicArgumentsSplitterTest >> testPrintString_oneParam [ self assert: subject printString equals: input ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testPrintString_onlyParams [ | subject input | input := 'foo=bar&a=b'. @@ -217,7 +219,7 @@ MicArgumentsSplitterTest >> testPrintString_onlyParams [ self assert: subject printString equals: input ] -{ #category : #tests } +{ #category : 'tests' } MicArgumentsSplitterTest >> testSeveralArguments [ | subject | subject := self subjectUnderTestWith: 'foo=bar&caption=this is lovely&aaa=99'. diff --git a/src/Microdown-Tests/MicBlockTest.class.st b/src/Microdown-Tests/MicBlockTest.class.st index 2891c313..67cefcae 100644 --- a/src/Microdown-Tests/MicBlockTest.class.st +++ b/src/Microdown-Tests/MicBlockTest.class.st @@ -1,30 +1,32 @@ Class { - #name : #MicBlockTest, - #superclass : #MicElementTest, + #name : 'MicBlockTest', + #superclass : 'MicElementTest', #instVars : [ 'subject' ], - #category : #'Microdown-Tests-Parser' + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #testing } +{ #category : 'testing' } MicBlockTest class >> isAbstract [ ^ self = MicBlockTest ] -{ #category : #tests } +{ #category : 'tests' } MicBlockTest >> subject [ ^ subject ifNil: [ subject := self subjectClass new ] ] -{ #category : #tests } +{ #category : 'tests' } MicBlockTest >> subjectClass [ ^ self subclassResponsibility ] -{ #category : #tests } +{ #category : 'tests' } MicBlockTest >> testHasProperty [ self deny: (self subject hasProperty: #foo). self subject propertyAt: #foo put: 'bar'. @@ -32,7 +34,7 @@ MicBlockTest >> testHasProperty [ self deny: (self subject hasProperty: #bar) ] -{ #category : #tests } +{ #category : 'tests' } MicBlockTest >> testProperties [ self assert: self subject properties isNotNil. self subject instVarNamed: 'properties' put: nil. @@ -50,21 +52,21 @@ MicBlockTest >> testProperties [ self subject instVarNamed: 'properties' put: nil ] -{ #category : #tests } +{ #category : 'tests' } MicBlockTest >> testPropertyAt [ self assert: (self subject propertyAt: #foo put: 'bar') equals: 'bar'. self assert: (self subject propertyAt: #foo) equals: 'bar'. self should: [ self subject propertyAt: #bar ] raise: MicPropertyError ] -{ #category : #tests } +{ #category : 'tests' } MicBlockTest >> testPropertyAtIfAbsent [ self assert: (self subject propertyAt: #foo put: 'bar') equals: 'bar'. self assert: (self subject propertyAt: #foo ifAbsent: [ 'baz' ]) equals: 'bar'. self assert: (self subject propertyAt: #bar ifAbsent: [ 'baz' ]) equals: 'baz' ] -{ #category : #tests } +{ #category : 'tests' } MicBlockTest >> testPropertyAtPut [ self subject propertyAt: #foo put: 'bar'. self assert: (self subject propertyAt: #foo) equals: 'bar'. @@ -73,7 +75,7 @@ MicBlockTest >> testPropertyAtPut [ self assert: (self subject propertyAt: #foo) equals: 'baz' ] -{ #category : #tests } +{ #category : 'tests' } MicBlockTest >> testSanity [ "If this test case fails, there is something wrong with the setup of the test-case." diff --git a/src/Microdown-Tests/MicCitationBlockTest.class.st b/src/Microdown-Tests/MicCitationBlockTest.class.st index ed2ce8a7..7c0a6ac2 100644 --- a/src/Microdown-Tests/MicCitationBlockTest.class.st +++ b/src/Microdown-Tests/MicCitationBlockTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #MicCitationBlockTest, - #superclass : #MicAnnotationSubclassTest, - #category : #'Microdown-Tests-Extensions' + #name : 'MicCitationBlockTest', + #superclass : 'MicAnnotationSubclassTest', + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } MicCitationBlockTest >> testCreateTheRightCitationObject [ | doc | @@ -14,7 +16,7 @@ MicCitationBlockTest >> testCreateTheRightCitationObject [ self assert: (doc children first children first arguments at: #key) equals: 'Duca99a'. ] -{ #category : #tests } +{ #category : 'tests' } MicCitationBlockTest >> testDefaultingClassWhenNoTag [ | doc | diff --git a/src/Microdown-Tests/MicCodeBlockTest.class.st b/src/Microdown-Tests/MicCodeBlockTest.class.st index 12fb90ba..7517d00c 100644 --- a/src/Microdown-Tests/MicCodeBlockTest.class.st +++ b/src/Microdown-Tests/MicCodeBlockTest.class.st @@ -13,17 +13,19 @@ If you want to embed codeblock inside codeblock you must use an extra space. ``` " Class { - #name : #MicCodeBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicCodeBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> subjectClass [ ^ MicCodeBlock ] -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> testBody [ | source root textBody | textBody := 'my fancy code @@ -34,7 +36,7 @@ is really cool'. ] -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> testCanConsumeLine [ "This test verfies that when a code block is closed it does not consume anymore." "It also show that consume is not just blindly do a line starts with the markup @@ -54,7 +56,7 @@ is really cool'. self deny: (root children first canConsumeLine: 'plain text') ] -{ #category : #'tests - code' } +{ #category : 'tests - code' } MicCodeBlockTest >> testCaption [ | codeBlock | @@ -65,7 +67,7 @@ MicCodeBlockTest >> testCaption [ self assert: codeBlock captionElements size equals: 2. ] -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> testCodeBlockWithNestedCodeBlock [ "This test shows that we can write a code block inside a code block but that the later is not interpreter." @@ -88,7 +90,7 @@ MicCodeBlockTest >> testCodeBlockWithNestedCodeBlock [ ] -{ #category : #'tests - code' } +{ #category : 'tests - code' } MicCodeBlockTest >> testCodeCreatesInnerText [ | code | @@ -97,7 +99,7 @@ MicCodeBlockTest >> testCodeCreatesInnerText [ self assert: (code arguments at: #language) equals: 'a b```' ] -{ #category : #'tests - first tag' } +{ #category : 'tests - first tag' } MicCodeBlockTest >> testFirstTagNoValue [ " @@ -117,7 +119,7 @@ Color >> asMorph self assert: (code arguments at:#language) equals: 'Method' ] -{ #category : #'tests - first tag' } +{ #category : 'tests - first tag' } MicCodeBlockTest >> testFirstTagValue [ | source codeBlock | @@ -127,7 +129,7 @@ MicCodeBlockTest >> testFirstTagValue [ self assert: (codeBlock language) equals: '12'. ] -{ #category : #'tests - first tag' } +{ #category : 'tests - first tag' } MicCodeBlockTest >> testFirstTagWithValue [ " @@ -147,7 +149,7 @@ Color >> asMorph self assert: (code arguments at:#language) equals: 'PharoMethod' ] -{ #category : #'tests - deviation' } +{ #category : 'tests - deviation' } MicCodeBlockTest >> testFourBackQuotes [ | codeBlock | @@ -158,7 +160,7 @@ something in the way self assert: codeBlock children first body equals: 'something in the way' ] -{ #category : #'tests - deviation' } +{ #category : 'tests - deviation' } MicCodeBlockTest >> testFourBackQuotesClosedByThreeQuotes [ | codeBlock | @@ -169,7 +171,7 @@ something in the way self assert: codeBlock children first body equals: 'something in the way' ] -{ #category : #'tests - deviation' } +{ #category : 'tests - deviation' } MicCodeBlockTest >> testFourBackQuotesOnMultipleLines [ | codeBlock | @@ -184,7 +186,7 @@ pif glop or pas glop' ] -{ #category : #'tests - deviation' } +{ #category : 'tests - deviation' } MicCodeBlockTest >> testFourBackQuotesOnMultipleLinesWithText [ | codeBlock | @@ -205,7 +207,7 @@ pif glop or pas glop' ] -{ #category : #'tests - deviation' } +{ #category : 'tests - deviation' } MicCodeBlockTest >> testFourBackQuotesWithTextAround [ | codeBlock | @@ -221,7 +223,7 @@ Ending text'. self assert: codeBlock children second body equals: 'something in the way' ] -{ #category : #'tests - code' } +{ #category : 'tests - code' } MicCodeBlockTest >> testHasBody [ | source root textBody | @@ -231,7 +233,7 @@ MicCodeBlockTest >> testHasBody [ self assert: root children first hasBody ] -{ #category : #'tests - code' } +{ #category : 'tests - code' } MicCodeBlockTest >> testHasBody_not [ | source root textBody | @@ -241,7 +243,7 @@ MicCodeBlockTest >> testHasBody_not [ self assert: root children first hasBody not ] -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> testHasCaption [ " @@ -261,7 +263,7 @@ Color >> asMorph self assert: code hasCaption ] -{ #category : #'tests - arguments' } +{ #category : 'tests - arguments' } MicCodeBlockTest >> testHasLabelFalse [ " ```language=pharo&caption=Getting a morph for an instance of ==Color==&label=scr:asMorphInColor @@ -277,7 +279,7 @@ Color >> asMorph self deny: code hasLabel ] -{ #category : #'tests - arguments' } +{ #category : 'tests - arguments' } MicCodeBlockTest >> testHasLabelTrue [ " ```language=pharo&caption=Getting a morph for an instance of ==Color==&label=scr:asMorphInColor @@ -293,7 +295,7 @@ Color >> asMorph self assert: code hasLabel ] -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> testHasNOCaption [ " ```language=pharo&caption=Getting a morph for an instance of ==Color==&label=scr:asMorphInColor @@ -312,7 +314,7 @@ Color >> asMorph self deny: code hasCaption ] -{ #category : #'tests - arguments' } +{ #category : 'tests - arguments' } MicCodeBlockTest >> testLanguage [ " @@ -329,7 +331,7 @@ Color >> asMorph self assert: code language equals: 'pharo' ] -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> testOpenCanConsumeLine [ | source root textBody argument line code | @@ -364,7 +366,7 @@ is really cool'. ] -{ #category : #'tests - code' } +{ #category : 'tests - code' } MicCodeBlockTest >> testSetLabel [ | codeBlock | @@ -375,7 +377,7 @@ MicCodeBlockTest >> testSetLabel [ ] -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> testSingleBlockWithArguments [ " ```language=pharo&caption=Getting a morph for an instance of ==Color==&label=scr:asMorphInColor @@ -397,7 +399,7 @@ Color >> asMorph self assert: (code arguments at:#label) equals: 'scr:asMorphInColor'. ] -{ #category : #tests } +{ #category : 'tests' } MicCodeBlockTest >> testSingleBlockWithArgumentsWithFormat [ " @@ -429,7 +431,7 @@ Color >> asMorph self assert: code label equals: 'scr:asMorphInColor'. ] -{ #category : #'tests - deviation' } +{ #category : 'tests - deviation' } MicCodeBlockTest >> testThreeBackQuotesClosedByFourQuotes [ | codeBlock | diff --git a/src/Microdown-Tests/MicColumnsBlockTest.class.st b/src/Microdown-Tests/MicColumnsBlockTest.class.st index aaeae1b1..a76cbcf5 100644 --- a/src/Microdown-Tests/MicColumnsBlockTest.class.st +++ b/src/Microdown-Tests/MicColumnsBlockTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #MicColumnsBlockTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Extensions' + #name : 'MicColumnsBlockTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } MicColumnsBlockTest >> testSimpleColumn [ | doc | @@ -32,7 +34,7 @@ MicColumnsBlockTest >> testSimpleColumn [ self assert: doc children first children second children first class equals: MicUnorderedListBlock. ] -{ #category : #tests } +{ #category : 'tests' } MicColumnsBlockTest >> testSimpleColumnWithWidth [ | doc | diff --git a/src/Microdown-Tests/MicCommentTest.class.st b/src/Microdown-Tests/MicCommentTest.class.st index d23a12c1..40d7b4cf 100644 --- a/src/Microdown-Tests/MicCommentTest.class.st +++ b/src/Microdown-Tests/MicCommentTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #MicCommentTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicCommentTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicCommentTest >> subjectClass [ ^ MicCommentBlock ] -{ #category : #tests } +{ #category : 'tests' } MicCommentTest >> testCommentAPI [ | comment | diff --git a/src/Microdown-Tests/MicElementTest.class.st b/src/Microdown-Tests/MicElementTest.class.st index 2d1204a0..58e69a76 100644 --- a/src/Microdown-Tests/MicElementTest.class.st +++ b/src/Microdown-Tests/MicElementTest.class.st @@ -1,27 +1,29 @@ Class { - #name : #MicElementTest, - #superclass : #TestCase, + #name : 'MicElementTest', + #superclass : 'TestCase', #instVars : [ 'parser' ], #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Tests-Parser' + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #testing } +{ #category : 'testing' } MicElementTest class >> isAbstract [ ^ self = MicElementTest ] -{ #category : #factory } +{ #category : 'factory' } MicElementTest >> parser [ ^ self parserClass new ] -{ #category : #factory } +{ #category : 'factory' } MicElementTest >> parserClass [ "This references to MicrodownParser is needed for the test. Replacing it by Microdown does not work." @@ -29,7 +31,7 @@ MicElementTest >> parserClass [ ^ MicrodownParser ] -{ #category : #running } +{ #category : 'running' } MicElementTest >> setUp [ super setUp. diff --git a/src/Microdown-Tests/MicEnvironmentBlockTest.class.st b/src/Microdown-Tests/MicEnvironmentBlockTest.class.st index 2e22f7a7..d9807814 100644 --- a/src/Microdown-Tests/MicEnvironmentBlockTest.class.st +++ b/src/Microdown-Tests/MicEnvironmentBlockTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicEnvironmentBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicEnvironmentBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> subjectClass [ ^ MicEnvironmentBlock ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testEnvironment [ "'> testEnvironmentClosingNotEatingClosingCharacter [ @@ -42,7 +44,7 @@ to self assert: env children first text equals: 'to'. ] -{ #category : #'tests - extensions' } +{ #category : 'tests - extensions' } MicEnvironmentBlockTest >> testEnvironmentIsCreatedWhenTagDoesNotMatch [ | source root env environmentName | @@ -59,7 +61,7 @@ MicEnvironmentBlockTest >> testEnvironmentIsCreatedWhenTagDoesNotMatch [ ] -{ #category : #'tests - extensions' } +{ #category : 'tests - extensions' } MicEnvironmentBlockTest >> testEnvironmentWiathArgsWithCorrespondingClassIsCreated [ | source root environment environmentName contents | @@ -81,7 +83,7 @@ toto'. ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testEnvironmentWithAnyNestedElement [ "'> testEnvironmentWithArguments [ "'> testEnvironmentWithBrokenMotherNested [ | root | @@ -158,7 +160,7 @@ The mother environment is not closed so it will eat everything. ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testEnvironmentWithBrokenNestedScript [ | root | @@ -173,7 +175,7 @@ MicEnvironmentBlockTest >> testEnvironmentWithBrokenNestedScript [ self assert: root children first children first class equals: MicPharoScriptBlock. ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testEnvironmentWithCodeBlock [ | root env | @@ -197,7 +199,7 @@ isn''t it ] -{ #category : #'tests - extensions' } +{ #category : 'tests - extensions' } MicEnvironmentBlockTest >> testEnvironmentWithCorrespondingClassIsCreated [ | source root env environmentName | @@ -215,7 +217,7 @@ MicEnvironmentBlockTest >> testEnvironmentWithCorrespondingClassIsCreated [ ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testEnvironmentWithFormat [ "'> testEnvironmentWithMultipleLines [ "'> testEnvironmentWithNoEmptyBeforeTheEndMarker [ @@ -286,7 +288,7 @@ environment, else we force writer to enter a new line to declare the end of the paragraph.'. ] -{ #category : #'tests - extensions' } +{ #category : 'tests - extensions' } MicEnvironmentBlockTest >> testExtensionClassWithSpaceAndArgIsCreated [ | source root environment environmentName contents | @@ -310,7 +312,7 @@ toto'. ] -{ #category : #'tests - better parsing' } +{ #category : 'tests - better parsing' } MicEnvironmentBlockTest >> testInputFileOnOneLineWithJunkAfter [ | mic infileReference | @@ -319,7 +321,7 @@ MicEnvironmentBlockTest >> testInputFileOnOneLineWithJunkAfter [ self assert: infileReference path equals: 'chapters/withStyle.md' ] -{ #category : #'tests - better parsing' } +{ #category : 'tests - better parsing' } MicEnvironmentBlockTest >> testInputFileOnOneLineWithJunkSpaceBeforeEnd [ | mic infileReference | @@ -328,7 +330,7 @@ MicEnvironmentBlockTest >> testInputFileOnOneLineWithJunkSpaceBeforeEnd [ self assert: infileReference path equals: 'chapters/withStyle.md' ] -{ #category : #'tests - better parsing' } +{ #category : 'tests - better parsing' } MicEnvironmentBlockTest >> testInputFileOnOneLineWithSpaceBeforeJunkAfter [ | mic infileReference | @@ -337,7 +339,7 @@ MicEnvironmentBlockTest >> testInputFileOnOneLineWithSpaceBeforeJunkAfter [ self assert: infileReference path equals: 'chapters/withStyle.md' ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testParagraphEnvironmentParagraph [ | root | root := parser parse: 'What a super day for a ride. @@ -356,7 +358,7 @@ Yes this is a good idea.'. ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testParagraphEnvironmentParagraph2 [ "This test has a space after ?> '?> ' - was strangely broken at one point in time" | root | @@ -374,7 +376,7 @@ Yes this is a good idea.'. ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testParagraphEnvironmentParagraph3 [ "Text after ?> should be ignored - was strangely broken at one point in time" | root | @@ -392,7 +394,7 @@ Yes this is a good idea.'. ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testSecondScriptShouldNotBeChildOfFirst [ | root | @@ -414,7 +416,7 @@ MicEnvironmentBlockTest >> testSecondScriptShouldNotBeChildOfFirst [ children size equals: 2 ] -{ #category : #'tests - default environment' } +{ #category : 'tests - default environment' } MicEnvironmentBlockTest >> testSecondScriptShouldNotBeChildOfFirstWhenClosingOnTheSameLine [ | root | diff --git a/src/Microdown-Tests/MicFigureBlockTest.class.st b/src/Microdown-Tests/MicFigureBlockTest.class.st index e7afbabb..58a97659 100644 --- a/src/Microdown-Tests/MicFigureBlockTest.class.st +++ b/src/Microdown-Tests/MicFigureBlockTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #MicFigureBlockTest, - #superclass : #MicBlockTest, + #name : 'MicFigureBlockTest', + #superclass : 'MicBlockTest', #instVars : [ 'splitterClass' ], - #category : #'Microdown-Tests-Parser' + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #running } +{ #category : 'running' } MicFigureBlockTest >> setUp [ super setUp. @@ -15,12 +17,12 @@ MicFigureBlockTest >> setUp [ splitterClass := MicInlineParser ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> subjectClass [ ^ MicFigureBlock ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testAlt [ | figure | @@ -32,7 +34,7 @@ MicFigureBlockTest >> testAlt [ self assert: figure alt equals: 'je suis le alt texte' ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testAnchor [ | figure | @@ -45,7 +47,7 @@ MicFigureBlockTest >> testAnchor [ self assert: figure anchor equals: '233' ] -{ #category : #running } +{ #category : 'running' } MicFigureBlockTest >> testArgumentAtIfPresent [ | expected tested | @@ -60,7 +62,7 @@ MicFigureBlockTest >> testArgumentAtIfPresent [ self assert: (tested arguments at: 'testKey') equals: 'object'. ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testCaption [ | figure | figure := (splitterClass new parse: '![caption with space and dot...](http://www.Pharo.ORG)') first. @@ -69,7 +71,7 @@ MicFigureBlockTest >> testCaption [ ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testHasArguments [ | figure | figure := (splitterClass new parse: '![caption with space and dot...](https://github.com/pillar-markup/Microdown/runs/4336482137?check_suite_focus=true width=80&anchor=bla)') first. @@ -82,7 +84,7 @@ MicFigureBlockTest >> testHasArguments [ ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testHasNoArguments [ | figure | figure := (splitterClass new parse: '![caption with space and dot...](https://github.com/pillar-markup/Microdown/runs/4336482137?check_suite_focus=true)') first. @@ -93,14 +95,14 @@ MicFigureBlockTest >> testHasNoArguments [ ] -{ #category : #'tests - testing' } +{ #category : 'tests - testing' } MicFigureBlockTest >> testIsNotRelativeFilePathWithUrl [ | figure | figure := (splitterClass new parse: '![caption](http://www.pharo.org)') first. self assert: figure reference fullName asString equals: 'http://www.pharo.org/' ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testPrintOn [ | figure | figure := (splitterClass new parse: '![caption](http://www.Pharo.ORG)') first. @@ -109,14 +111,14 @@ MicFigureBlockTest >> testPrintOn [ "not really good but let us make it work" ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testPrintOnWithParameters [ | figure | figure := (splitterClass new parse: '![caption](http://anURL.org?label=1&title=testFigure)') first. self assert: figure printString equals: '![caption](http://anURL.org?label=1&title=testFigure)' ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testUrlWitMicrodownParameterAndUrlParameters [ | figure | @@ -128,7 +130,7 @@ MicFigureBlockTest >> testUrlWitMicrodownParameterAndUrlParameters [ self assert: (figure arguments at: 'delog') equals: '1' ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testUrlWithMicrodownParameters [ | figure | @@ -138,7 +140,7 @@ MicFigureBlockTest >> testUrlWithMicrodownParameters [ self assert: (figure arguments at: 'anchor') equals: 'fig:pharo' ] -{ #category : #tests } +{ #category : 'tests' } MicFigureBlockTest >> testUrlWithoutMicrodownParameters2 [ | figure | diff --git a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st index 7d58ca6f..11c05d50 100644 --- a/src/Microdown-Tests/MicFileResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicFileResourceReferenceTest.class.st @@ -3,16 +3,18 @@ These tests will fail if MicHTTPResourceTest fails. I read the files from the gi " Class { - #name : #MicFileResourceReferenceTest, - #superclass : #TestCase, + #name : 'MicFileResourceReferenceTest', + #superclass : 'TestCase', #instVars : [ 'filesystem', 'emptyFilesystem' ], - #category : #'Microdown-Tests-Resolution' + #category : 'Microdown-Tests-Resolution', + #package : 'Microdown-Tests', + #tag : 'Resolution' } -{ #category : #private } +{ #category : 'private' } MicFileResourceReferenceTest >> exampleMicFileResourceReference [ | file | @@ -20,7 +22,7 @@ MicFileResourceReferenceTest >> exampleMicFileResourceReference [ ^ MicFileResourceReference fromFileRef: file ] -{ #category : #private } +{ #category : 'private' } MicFileResourceReferenceTest >> exampleMicFileResourceReferenceInsideSubFolder [ | file | @@ -28,7 +30,7 @@ MicFileResourceReferenceTest >> exampleMicFileResourceReferenceInsideSubFolder [ ^ MicFileResourceReference fromFileRef: file ] -{ #category : #private } +{ #category : 'private' } MicFileResourceReferenceTest >> examplePNGByteArray [ ^ #[137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 82 0 0 0 200 0 0 0 90 4 3 0 0 0 15 @@ -53,7 +55,7 @@ MicFileResourceReferenceTest >> examplePNGByteArray [ 78 68 174 66 96 130] ] -{ #category : #private } +{ #category : 'private' } MicFileResourceReferenceTest >> examplePNGFile [ " Answer a
    for testing purposes " @@ -61,13 +63,13 @@ MicFileResourceReferenceTest >> examplePNGFile [ ] -{ #category : #private } +{ #category : 'private' } MicFileResourceReferenceTest >> examplePNGFileContents [ ^ self examplePNGByteArray readStream ] -{ #category : #private } +{ #category : 'private' } MicFileResourceReferenceTest >> exampleReadmeFile [ " Answer a on a memory file system for testing purposes " @@ -76,7 +78,7 @@ MicFileResourceReferenceTest >> exampleReadmeFile [ yourself ] -{ #category : #private } +{ #category : 'private' } MicFileResourceReferenceTest >> exampleReadmeFileContents [ " Answer a for file resource testing purposes " @@ -101,7 +103,7 @@ Link to a document in subfolder: ' ] -{ #category : #private } +{ #category : 'private' } MicFileResourceReferenceTest >> exampleReadmeFileInsideSubFolder [ " Answer a on a memory file system for testing purposes " filesystem ensureCreateDirectory: 'figures'. @@ -110,7 +112,7 @@ MicFileResourceReferenceTest >> exampleReadmeFileInsideSubFolder [ yourself ] -{ #category : #running } +{ #category : 'running' } MicFileResourceReferenceTest >> setUp [ | readme image file | super setUp. @@ -130,7 +132,7 @@ MicFileResourceReferenceTest >> setUp [ ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testContents [ | micFileResource | @@ -138,7 +140,7 @@ MicFileResourceReferenceTest >> testContents [ self assert: micFileResource contents equals: self exampleReadmeFileContents ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testContentsInsideSubFolder [ | micFileResource | @@ -147,14 +149,14 @@ MicFileResourceReferenceTest >> testContentsInsideSubFolder [ self assert: micFileResource contents equals: self exampleReadmeFileContents ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testContentsOfDirectory [ | ref | ref := filesystem workingDirectory asMicResourceReference. self assert: ref contents equals: '' ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testContentsSet [ |ref header | ref := (MicResourceReference fromUri: 'file:/example.md') @@ -165,7 +167,7 @@ MicFileResourceReferenceTest >> testContentsSet [ self assert: header children first text equals: 'Super cool header' ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testFileReferenceExtensionMethod [ | fileRef micRef | fileRef := '/path/to/nowhere.md' asFileReference. @@ -174,7 +176,7 @@ MicFileResourceReferenceTest >> testFileReferenceExtensionMethod [ self assert: micRef fullName equals: (fileRef fullName copyReplaceAll: WindowsStore delimiter asString with: UnixStore delimiter asString) ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testFileReferenceExtensionMethod_dir [ | fileRef micRef | fileRef := (filesystem workingDirectory / '/subdir') asFileReference. @@ -184,7 +186,7 @@ MicFileResourceReferenceTest >> testFileReferenceExtensionMethod_dir [ self assert: (micRef uri printString endsWith: '/') ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testFullName [ self assert: 'figures/foo.png' asMicResourceReference fullName equals: 'figures/foo.png'. @@ -193,14 +195,14 @@ MicFileResourceReferenceTest >> testFullName [ self assert: 'file:///figures/foo.png' asMicResourceReference fullName equals: '/figures/foo.png' ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testIsDirectory [ | ref | ref := filesystem workingDirectory asMicResourceReference. self assert: ref isDirectory ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testLoadChildren [ | ref files | ref := filesystem workingDirectory asMicResourceReference. @@ -209,7 +211,7 @@ MicFileResourceReferenceTest >> testLoadChildren [ self assert: files first class equals: MicFileResourceReference ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testLoadImage [ | ref image | @@ -221,7 +223,7 @@ MicFileResourceReferenceTest >> testLoadImage [ self assert: image width equals: 200 ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testLoadMicrodown [ | ref doc | ref := (MicResourceReference fromUri: 'file:/readme.md') @@ -232,7 +234,7 @@ MicFileResourceReferenceTest >> testLoadMicrodown [ ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testLoadNotCorrectImage [ | ref | ref := (MicResourceReference fromUri: 'file:/readme.md') @@ -242,7 +244,7 @@ MicFileResourceReferenceTest >> testLoadNotCorrectImage [ raise: UnrecognizedImageFormatError ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testLoadNotCorrectMicrodown [ | ref | @@ -253,7 +255,7 @@ MicFileResourceReferenceTest >> testLoadNotCorrectMicrodown [ raise: ZnInvalidUTF8 ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testLoadNotFoundImage [ | ref | @@ -265,7 +267,7 @@ MicFileResourceReferenceTest >> testLoadNotFoundImage [ self assert: e messageText equals: 'Microdown file not found' ] ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testLoadNotFoundMicrodown [ | uri ref | uri := 'file:///readme.md'. @@ -278,7 +280,7 @@ MicFileResourceReferenceTest >> testLoadNotFoundMicrodown [ self assert: e messageText equals: 'Microdown file not found' ] ] -{ #category : #tests } +{ #category : 'tests' } MicFileResourceReferenceTest >> testPath [ self assert: 'figures/foo.png' asMicResourceReference path equals: 'figures/foo.png'. diff --git a/src/Microdown-Tests/MicFootnoteBlockTest.class.st b/src/Microdown-Tests/MicFootnoteBlockTest.class.st index 8f137f0f..08a8fd6e 100644 --- a/src/Microdown-Tests/MicFootnoteBlockTest.class.st +++ b/src/Microdown-Tests/MicFootnoteBlockTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #MicFootnoteBlockTest, - #superclass : #MicAnnotationSubclassTest, - #category : #'Microdown-Tests-Extensions' + #name : 'MicFootnoteBlockTest', + #superclass : 'MicAnnotationSubclassTest', + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } MicFootnoteBlockTest >> testCreateTheRightFootnoteObject [ | doc | diff --git a/src/Microdown-Tests/MicFormatBlockTest.class.st b/src/Microdown-Tests/MicFormatBlockTest.class.st index 808296c3..c5d5c53c 100644 --- a/src/Microdown-Tests/MicFormatBlockTest.class.st +++ b/src/Microdown-Tests/MicFormatBlockTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicFormatBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicFormatBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicFormatBlockTest >> subjectClass [ ^ MicBoldFormatBlock ] -{ #category : #'tests - bold' } +{ #category : 'tests - bold' } MicFormatBlockTest >> testBoldAPIToAccessText [ | bold | @@ -19,7 +21,7 @@ MicFormatBlockTest >> testBoldAPIToAccessText [ self assert: bold textElement substring equals: 'a b' ] -{ #category : #'tests - bold' } +{ #category : 'tests - bold' } MicFormatBlockTest >> testBoldAPIToSetText [ | bold | @@ -29,7 +31,7 @@ MicFormatBlockTest >> testBoldAPIToSetText [ self assert: bold textElement substring equals: 'Blblbl' ] -{ #category : #'tests - bold' } +{ #category : 'tests - bold' } MicFormatBlockTest >> testBoldCreatesInnerText [ | bold | @@ -39,7 +41,7 @@ MicFormatBlockTest >> testBoldCreatesInnerText [ self assert: bold children first substring equals: 'a b' ] -{ #category : #'tests - bold' } +{ #category : 'tests - bold' } MicFormatBlockTest >> testBoldItalicAPIToAccessText [ | italic | @@ -52,7 +54,7 @@ MicFormatBlockTest >> testBoldItalicAPIToAccessText [ self assert: italic textElement substring equals: 'a b' ] -{ #category : #tests } +{ #category : 'tests' } MicFormatBlockTest >> testBoldWrappedElements [ | paragraph | @@ -64,7 +66,7 @@ MicFormatBlockTest >> testBoldWrappedElements [ ] -{ #category : #'tests - bold' } +{ #category : 'tests - bold' } MicFormatBlockTest >> testBoldWrappedWithAccessAPIElements [ | paragraph | @@ -77,7 +79,7 @@ MicFormatBlockTest >> testBoldWrappedWithAccessAPIElements [ self assert: paragraph children second substring equals: ' c' ] -{ #category : #tests } +{ #category : 'tests' } MicFormatBlockTest >> testHasProperty [ self assert: (self subject propertyAt: #foo ifAbsent: [ true ]) . @@ -86,7 +88,7 @@ MicFormatBlockTest >> testHasProperty [ self deny: (self subject hasProperty: #bar) ] -{ #category : #'tests - italic' } +{ #category : 'tests - italic' } MicFormatBlockTest >> testItalicAPIToAccessText [ | italic | @@ -96,7 +98,7 @@ MicFormatBlockTest >> testItalicAPIToAccessText [ self assert: italic textElement substring equals: 'a b' ] -{ #category : #'tests - italic' } +{ #category : 'tests - italic' } MicFormatBlockTest >> testItalicAPIToSetText [ | italic | @@ -106,7 +108,7 @@ MicFormatBlockTest >> testItalicAPIToSetText [ self assert: italic textElement substring equals: 'Blblbl' ] -{ #category : #'tests - italic' } +{ #category : 'tests - italic' } MicFormatBlockTest >> testItalicCreatesInnerText [ | italic | @@ -116,7 +118,7 @@ MicFormatBlockTest >> testItalicCreatesInnerText [ self assert: italic children first substring equals: 'a b' ] -{ #category : #'tests - italic' } +{ #category : 'tests - italic' } MicFormatBlockTest >> testItalicWrappedElements [ | paragraph | @@ -131,7 +133,7 @@ MicFormatBlockTest >> testItalicWrappedElements [ equals: MicTextBlock ] -{ #category : #'tests - italic' } +{ #category : 'tests - italic' } MicFormatBlockTest >> testItalicWrappedWithAccessAPIElements [ | paragraph | @@ -144,7 +146,7 @@ MicFormatBlockTest >> testItalicWrappedWithAccessAPIElements [ self assert: paragraph children second substring equals: ' c' ] -{ #category : #'tests - monospace' } +{ #category : 'tests - monospace' } MicFormatBlockTest >> testMonospaceCreatesInnerText [ | mono | @@ -154,7 +156,7 @@ MicFormatBlockTest >> testMonospaceCreatesInnerText [ self assert: mono children first substring equals: 'a b' ] -{ #category : #'tests - monospace' } +{ #category : 'tests - monospace' } MicFormatBlockTest >> testMonospaceTextCreatesInnerText [ | mono | @@ -165,7 +167,7 @@ MicFormatBlockTest >> testMonospaceTextCreatesInnerText [ self assert: mono textElement substring equals: 'a b' ] -{ #category : #'tests - monospace' } +{ #category : 'tests - monospace' } MicFormatBlockTest >> testMonospaceWrappedElements [ | mono | @@ -174,7 +176,7 @@ MicFormatBlockTest >> testMonospaceWrappedElements [ self assert: mono wrappedElements first substring equals: 'a b' ] -{ #category : #'tests - bold' } +{ #category : 'tests - bold' } MicFormatBlockTest >> testPrintingBold [ | bold | @@ -183,7 +185,7 @@ MicFormatBlockTest >> testPrintingBold [ ] -{ #category : #'tests - monospace' } +{ #category : 'tests - monospace' } MicFormatBlockTest >> testPrintingBold2 [ | bold | @@ -191,7 +193,7 @@ MicFormatBlockTest >> testPrintingBold2 [ self assert: bold printString equals: 'MonospaceFormat(Text(_a b_))' ] -{ #category : #'tests - italic' } +{ #category : 'tests - italic' } MicFormatBlockTest >> testPrintingItalic [ | bold | @@ -199,7 +201,7 @@ MicFormatBlockTest >> testPrintingItalic [ self assert: bold printString equals: 'ItalicFormat(Text(a b))' ] -{ #category : #tests } +{ #category : 'tests' } MicFormatBlockTest >> testProperties [ self assert: self subject properties isNotNil. diff --git a/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st b/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st index f3873c97..9963ab06 100644 --- a/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicHTTPResourceReferenceTest.class.st @@ -2,21 +2,23 @@ A MicHTTPResourceTest is a test class for testing the behavior of MicHTTPResource " Class { - #name : #MicHTTPResourceReferenceTest, - #superclass : #TestCase, + #name : 'MicHTTPResourceReferenceTest', + #superclass : 'TestCase', #instVars : [ 'baseUrl', 'offlineSetting' ], - #category : #'Microdown-Tests-Resolution' + #category : 'Microdown-Tests-Resolution', + #package : 'Microdown-Tests', + #tag : 'Resolution' } -{ #category : #'test data' } +{ #category : 'test data' } MicHTTPResourceReferenceTest class >> githubTestData [ ^ MicResourceReference fromUri: 'https://raw.githubusercontent.com/pillar-markup/Microdown/dev/doc/testMicrodown/' ] -{ #category : #running } +{ #category : 'running' } MicHTTPResourceReferenceTest >> setUp [ super setUp. "All tests assume to be online" @@ -25,7 +27,7 @@ MicHTTPResourceReferenceTest >> setUp [ baseUrl := 'https://raw.githubusercontent.com/pillar-markup/Microdown/dev/doc/testMicrodown/' ] -{ #category : #running } +{ #category : 'running' } MicHTTPResourceReferenceTest >> tearDown [ Microdown offline: offlineSetting. @@ -33,7 +35,7 @@ MicHTTPResourceReferenceTest >> tearDown [ super tearDown ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testContentsSet [ self should: [('https://someplace.irk/mydocument.md' asMicResourceReference ) contents: '### Impossible'] @@ -42,7 +44,7 @@ MicHTTPResourceReferenceTest >> testContentsSet [ ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testErrorNonCorrectImage [ | ref | @@ -53,7 +55,7 @@ MicHTTPResourceReferenceTest >> testErrorNonCorrectImage [ raise: UnrecognizedImageFormatError ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testErrorNonExistingImage [ | ref | @@ -63,14 +65,14 @@ MicHTTPResourceReferenceTest >> testErrorNonExistingImage [ raise: MicResourceReferenceError ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testFullName [ self assert: 'http://pharo.org/figures/foo.png' asMicResourceReference fullName equals: 'http://pharo.org/figures/foo.png'. ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testLoadErrorMicrodown [ | ref | ref := MicResourceReference fromUri: baseUrl ,'toplevel.png'. @@ -80,7 +82,7 @@ MicHTTPResourceReferenceTest >> testLoadErrorMicrodown [ raise: ZnInvalidUTF8 ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testLoadImage [ | ref image | @@ -91,7 +93,7 @@ MicHTTPResourceReferenceTest >> testLoadImage [ self assert: image width equals: 200 ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testLoadMicrodown [ | ref doc | ref := MicResourceReference fromUri: baseUrl , 'readme.md'. @@ -101,7 +103,7 @@ MicHTTPResourceReferenceTest >> testLoadMicrodown [ ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testLoadMicrodownResolvesUrlsRelativeToTheParent [ | ref doc topLevelImageRef | @@ -115,7 +117,7 @@ MicHTTPResourceReferenceTest >> testLoadMicrodownResolvesUrlsRelativeToTheParent equals: 90 ] -{ #category : #tests } +{ #category : 'tests' } MicHTTPResourceReferenceTest >> testLoadNonExistingMicrodown [ | ref errorMessage| ref := MicResourceReference fromUri: baseUrl , 'readmeNOT.md'. diff --git a/src/Microdown-Tests/MicHeaderBlockTest.class.st b/src/Microdown-Tests/MicHeaderBlockTest.class.st index babdc6fd..82857b3b 100644 --- a/src/Microdown-Tests/MicHeaderBlockTest.class.st +++ b/src/Microdown-Tests/MicHeaderBlockTest.class.st @@ -2,17 +2,19 @@ I'm a test class for testing the behavior of MicHeaderBlock " Class { - #name : #MicHeaderBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicHeaderBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #running } +{ #category : 'running' } MicHeaderBlockTest >> subjectClass [ ^ MicHeaderBlock ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testCanConsumeLine [ | root headerString | @@ -21,7 +23,7 @@ MicHeaderBlockTest >> testCanConsumeLine [ self deny: (root children first canConsumeLine: headerString) ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderAPIToAccessText [ | header | @@ -31,7 +33,7 @@ MicHeaderBlockTest >> testHeaderAPIToAccessText [ self assert: header children first substring equals: 'titre1' ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderAPIToSetText [ | header | @@ -42,7 +44,7 @@ MicHeaderBlockTest >> testHeaderAPIToSetText [ self assert: header headerElements first substring equals: 'Blblbl' ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderCreatesInnerText [ | header | @@ -52,7 +54,7 @@ MicHeaderBlockTest >> testHeaderCreatesInnerText [ self assert: header children first substring equals: 'titre1' ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderLevel1 [ | root | root := parser parse: HeaderMarkup, ' Level1'. @@ -61,7 +63,7 @@ MicHeaderBlockTest >> testHeaderLevel1 [ self assert: root children first level equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderLevel1NoSpace [ | source root | @@ -72,7 +74,7 @@ MicHeaderBlockTest >> testHeaderLevel1NoSpace [ self assert: root children first level equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderLevel4 [ | source root | @@ -83,7 +85,7 @@ MicHeaderBlockTest >> testHeaderLevel4 [ self assert: root children first level equals: 4 ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderLevel6 [ | source root | source := (HeaderMarkup repeat: 6), ' Level six'. @@ -93,7 +95,7 @@ MicHeaderBlockTest >> testHeaderLevel6 [ self assert: root children first level equals: 6 ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderLevelOutOfRange [ | source header | source := (HeaderMarkup repeat: 1), ' Level one'. @@ -105,7 +107,7 @@ MicHeaderBlockTest >> testHeaderLevelOutOfRange [ ] -{ #category : #tests } +{ #category : 'tests' } MicHeaderBlockTest >> testHeaderLongElements [ | header | diff --git a/src/Microdown-Tests/MicHorizontalLineBlockTest.class.st b/src/Microdown-Tests/MicHorizontalLineBlockTest.class.st index 1b77ce1c..7621447f 100644 --- a/src/Microdown-Tests/MicHorizontalLineBlockTest.class.st +++ b/src/Microdown-Tests/MicHorizontalLineBlockTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #MicHorizontalLineBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicHorizontalLineBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicHorizontalLineBlockTest >> subjectClass [ ^ MicHorizontalLineBlock ] diff --git a/src/Microdown-Tests/MicInlineParserTest.class.st b/src/Microdown-Tests/MicInlineParserTest.class.st index 281af4a7..31ba562e 100644 --- a/src/Microdown-Tests/MicInlineParserTest.class.st +++ b/src/Microdown-Tests/MicInlineParserTest.class.st @@ -2,20 +2,22 @@ These tests should be merged in MicrodDownInlineParserTest " Class { - #name : #MicInlineParserTest, - #superclass : #TestCase, + #name : 'MicInlineParserTest', + #superclass : 'TestCase', #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Tests-Parser' + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicInlineParserTest >> splitter [ ^ MicInlineParser new ] -{ #category : #'tests - anchors' } +{ #category : 'tests - anchors' } MicInlineParserTest >> testAnchorReference [ | res | @@ -27,7 +29,7 @@ MicInlineParserTest >> testAnchorReference [ self assert: (res second isKindOf: MicAnchorReferenceBlock) ] -{ #category : #'tests - anchors' } +{ #category : 'tests - anchors' } MicInlineParserTest >> testAnchorReferenceUnevaluated [ "When isEvaluated class method returns false, like anchor reference's case, inline inside shoudn't be evaluated" @@ -40,7 +42,7 @@ MicInlineParserTest >> testAnchorReferenceUnevaluated [ 'Text(xyz)' } ] -{ #category : #'tests - annotation' } +{ #category : 'tests - annotation' } MicInlineParserTest >> testAnnotationWithParameters [ | res | @@ -55,7 +57,7 @@ MicInlineParserTest >> testAnnotationWithParameters [ self assert: (res second arguments at: 'label') equals: '42' ] -{ #category : #'tests - annotation' } +{ #category : 'tests - annotation' } MicInlineParserTest >> testAnnotationWithParametersWithBlank [ | res | @@ -69,7 +71,7 @@ MicInlineParserTest >> testAnnotationWithParametersWithBlank [ self assert: (res second arguments at: 'label') equals: '42' ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testBold [ | res | @@ -86,14 +88,14 @@ MicInlineParserTest >> testBold [ self assert: res second kind equals: #bold ] -{ #category : #tests } +{ #category : 'tests' } MicInlineParserTest >> testCurlyBraceDoesNotLeadToProblem [ | mic | mic := (self splitter parse: ' jhkjhk { a }') first. self assert: mic substring equals: ' jhkjhk { a }' ] -{ #category : #'tests to make green again' } +{ #category : 'tests to make green again' } MicInlineParserTest >> testEscapeCharacter [ "we should have just one escape" @@ -103,7 +105,7 @@ MicInlineParserTest >> testEscapeCharacter [ self assert: (res collect: [ :x | x printString ]) equals: { 'Text(not `mono` here)' } ] -{ #category : #'tests - escape' } +{ #category : 'tests - escape' } MicInlineParserTest >> testEscapeCharacterAtBeginning [ "Test the escape \ in simple case (here, bold one)" @@ -114,7 +116,7 @@ MicInlineParserTest >> testEscapeCharacterAtBeginning [ equals: { 'Text(**test**)' } ] -{ #category : #'tests - escape' } +{ #category : 'tests - escape' } MicInlineParserTest >> testEscapeCharacterInLinkName [ "Test the escape \ in link description" @@ -125,7 +127,7 @@ MicInlineParserTest >> testEscapeCharacterInLinkName [ equals: { 'Text(abc)'. '[**test**](myURL)'. 'Text(last)' } ] -{ #category : #'tests - escape' } +{ #category : 'tests - escape' } MicInlineParserTest >> testEscapeCharacterInNestedCase [ "Test the escape \ in case of nested formats" @@ -136,7 +138,7 @@ MicInlineParserTest >> testEscapeCharacterInNestedCase [ equals: {'Text(abc)' . 'ItalicFormat(Text(**not bold** italic))' . 'Text(last)'}. ] -{ #category : #'tests - escape' } +{ #category : 'tests - escape' } MicInlineParserTest >> testEscapeCharacterInNestedLinkName [ "Test the escape \ in case of nested linknames" @@ -147,7 +149,7 @@ MicInlineParserTest >> testEscapeCharacterInNestedLinkName [ equals: { 'Text(abc)'. '[[nested]](myURL)'. 'Text(last)' } ] -{ #category : #'tests to make green again' } +{ #category : 'tests to make green again' } MicInlineParserTest >> testEscapeCharacterTwoConsecutive [ "we should have just one escape" @@ -156,7 +158,7 @@ MicInlineParserTest >> testEscapeCharacterTwoConsecutive [ self assert: (res collect: [ :x | x printString ]) equals: { 'Text(\begin\atend\)' } ] -{ #category : #'tests to make green again' } +{ #category : 'tests to make green again' } MicInlineParserTest >> testEscapeCharacterWithNoCharacterAfter [ | res | @@ -166,7 +168,7 @@ MicInlineParserTest >> testEscapeCharacterWithNoCharacterAfter [ assert: res first substring equals: '\' ] -{ #category : #tests } +{ #category : 'tests' } MicInlineParserTest >> testEscapeEncode [ | roundTrip | self assert: (MicInlineParser escapeEncode: '') equals: ''. @@ -181,7 +183,7 @@ MicInlineParserTest >> testEscapeEncode [ self assert: (roundTrip value: '\\') equals: '\'. ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testEscapeMonospace [ "When isEvaluated class method returns false, like monospace's case, inline inside shoudn't be evaluated" @@ -192,7 +194,7 @@ MicInlineParserTest >> testEscapeMonospace [ self assert: res second class equals: MicMonospaceFormatBlock ] -{ #category : #tests } +{ #category : 'tests' } MicInlineParserTest >> testEscapeReEscape [ | roundTrip | roundTrip := [ :str :keep | @@ -204,7 +206,7 @@ MicInlineParserTest >> testEscapeReEscape [ self assert: (roundTrip value: '\aa\\bb' value: 'a') equals: 'aa\\bb'. ] -{ #category : #'tests - escape' } +{ #category : 'tests - escape' } MicInlineParserTest >> testEscapeTripleBold [ "Test the escape \ in case of nested formats" @@ -215,7 +217,7 @@ MicInlineParserTest >> testEscapeTripleBold [ equals: {'Text(c*)' . 'BoldFormat(Text(bo))' . 'Text(la)'}. ] -{ #category : #'tests - various' } +{ #category : 'tests - various' } MicInlineParserTest >> testExclamationMark [ "Test that 'bla!bla' is ok, and not a failed image, same goes for '![goo]no parenthesis'" @@ -231,7 +233,7 @@ MicInlineParserTest >> testExclamationMark [ equals: { 'Text(![goo]no parenthesis)' } ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicInlineParserTest >> testFigure [ "Test the image annotation ![AltText](url)" @@ -247,7 +249,7 @@ MicInlineParserTest >> testFigure [ ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicInlineParserTest >> testFigureWithBracketInsteadOfParentheses [ "Test the image annotation ![AltText](url)" @@ -259,7 +261,7 @@ MicInlineParserTest >> testFigureWithBracketInsteadOfParentheses [ equals: { 'Text(abc![AltText][my_directory/image.png]last)' } ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicInlineParserTest >> testFigureWithParameters [ "Test the image annotation ![AltText](url)" @@ -278,7 +280,7 @@ MicInlineParserTest >> testFigureWithParameters [ self assert: (res second arguments at: 'width') equals: '90' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicInlineParserTest >> testFigureWithParametersWithBlank [ "Test the image annotation ![AltText](url)" @@ -297,7 +299,7 @@ MicInlineParserTest >> testFigureWithParametersWithBlank [ self assert: (res second arguments at: 'width') equals: '90' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicInlineParserTest >> testFigureWithParenthesesInsteadOfBracket [ "Test the image annotation ![AltText](url)" @@ -309,7 +311,7 @@ MicInlineParserTest >> testFigureWithParenthesesInsteadOfBracket [ equals: { 'Text(abc!(AltText)(my_directory/image.png)last)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testItalic [ | res | @@ -324,7 +326,7 @@ MicInlineParserTest >> testItalic [ equals: { 'Text(abc)'. 'ItalicFormat(Text( ita lics ))'. 'Text(def)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testItalicNestedInBold [ | res | @@ -335,7 +337,7 @@ MicInlineParserTest >> testItalicNestedInBold [ 'Text(xyz)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testItalicNestedInBoldWithSpace [ | res | @@ -345,7 +347,7 @@ MicInlineParserTest >> testItalicNestedInBoldWithSpace [ equals: { 'Text(abc)'. 'BoldFormat(Text(x) ItalicFormat(Text(y)) Text(z))'. 'Text(cba)' } ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicInlineParserTest >> testMath [ | res | @@ -357,7 +359,7 @@ MicInlineParserTest >> testMath [ self assert: (res second isKindOf: MicMathInlineBlock) ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicInlineParserTest >> testMath2 [ | res | @@ -367,7 +369,7 @@ MicInlineParserTest >> testMath2 [ equals: { 'Text(abc)'. '[math env](math)'. 'Text(def)' } ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicInlineParserTest >> testMathshouldBeUnevaluated [ "When isEvaluated class method returns false, like math's case, inline inside shoudn't be evaluated" @@ -380,7 +382,7 @@ MicInlineParserTest >> testMathshouldBeUnevaluated [ 'Text(xyz)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testMonospace [ | res | @@ -390,7 +392,7 @@ MicInlineParserTest >> testMonospace [ equals: { 'Text(ab)'. 'MonospaceFormat(Text(block))'. 'Text(de)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testMonospaceDoesNotTreatNestedElements [ | res | @@ -398,7 +400,7 @@ MicInlineParserTest >> testMonospaceDoesNotTreatNestedElements [ self assert: res first substring equals: '[* foo *])' ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testMonospaceUnevaluated [ "When isEvaluated class method returns false, like monospace's case, inline inside shoudn't be evaluated" @@ -411,7 +413,7 @@ MicInlineParserTest >> testMonospaceUnevaluated [ self assert: res second class equals: MicMonospaceFormatBlock ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testMultipleSequenceFormats [ "Test with multiple annotations" @@ -424,7 +426,7 @@ MicInlineParserTest >> testMultipleSequenceFormats [ 'Text(last)' } ] -{ #category : #'tests - various' } +{ #category : 'tests - various' } MicInlineParserTest >> testNoAnnotation [ | res | @@ -435,7 +437,7 @@ MicInlineParserTest >> testNoAnnotation [ self assert: res first printString equals: 'Text(abc def gh)' ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testOverlappingFormat [ | res | @@ -445,7 +447,7 @@ MicInlineParserTest >> testOverlappingFormat [ equals: #('Text(ab)' 'BoldFormat(Text(boldstart_ boldend))' 'Text( italicEnd_de)') ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testOverlappingFormat2 [ | res | @@ -455,7 +457,7 @@ MicInlineParserTest >> testOverlappingFormat2 [ equals: #('Text(ab)' 'BoldFormat(Text(boldstart_ boldend))' 'Text( )' 'ItalicFormat(Text(italicstart zz italicEnd))' 'Text(de)') ] -{ #category : #'tests - various' } +{ #category : 'tests - various' } MicInlineParserTest >> testParseEmptyText [ | res | @@ -463,7 +465,7 @@ MicInlineParserTest >> testParseEmptyText [ self assert: res isEmpty ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicInlineParserTest >> testParseMissingStartURL [ "Test the link annotation [LinkText]url)" @@ -472,7 +474,7 @@ MicInlineParserTest >> testParseMissingStartURL [ self assert: res first class = MicTextBlock. ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicInlineParserTest >> testParseMissingStartURLInPresenceOfNestedFormat [ "Test the link annotation [LinkText]url) _*foo*_" @@ -483,7 +485,7 @@ MicInlineParserTest >> testParseMissingStartURLInPresenceOfNestedFormat [ ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicInlineParserTest >> testParseShitInMiddleURL [ "Test the link annotation [Pharo is cool]khkjhjkh klhkjhkh (http://pharo.org)" @@ -495,7 +497,7 @@ MicInlineParserTest >> testParseShitInMiddleURL [ self assert: res size equals: 1 ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicInlineParserTest >> testRaw [ | res | @@ -505,7 +507,7 @@ MicInlineParserTest >> testRaw [ equals: { 'Text(abc)'. '[someRaw](raw)'. 'Text(def)' } ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicInlineParserTest >> testRawUnevaluated [ "When isEvaluated class method returns false, like raw's case, inline inside shoudn't be evaluated" @@ -518,7 +520,7 @@ MicInlineParserTest >> testRawUnevaluated [ 'Text(xyz)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testSequenceOfFormats [ "Test with multiple annotations" @@ -530,7 +532,7 @@ MicInlineParserTest >> testSequenceOfFormats [ 'Text(last)' } ] -{ #category : #'tests - annotation' } +{ #category : 'tests - annotation' } MicInlineParserTest >> testSplitAnnotation [ | res | @@ -542,7 +544,7 @@ MicInlineParserTest >> testSplitAnnotation [ 'Text(def)' } ] -{ #category : #'tests - annotation' } +{ #category : 'tests - annotation' } MicInlineParserTest >> testSplitBlockAnnotation [ | res | @@ -554,7 +556,7 @@ MicInlineParserTest >> testSplitBlockAnnotation [ self assert: (res second isKindOf: MicAnnotationBlock) ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicInlineParserTest >> testSplitBlockLink [ "Test the link annotation [LinkText](url)" @@ -567,7 +569,7 @@ MicInlineParserTest >> testSplitBlockLink [ ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicInlineParserTest >> testSplitBlockLinkIncomplete [ | res | @@ -578,7 +580,7 @@ MicInlineParserTest >> testSplitBlockLinkIncomplete [ self assert: res first class equals: MicTextBlock ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicInlineParserTest >> testSplitBlockLinkInlineImage [ | res | @@ -590,7 +592,7 @@ MicInlineParserTest >> testSplitBlockLinkInlineImage [ ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicInlineParserTest >> testSplitBlockLinkWithBracketInsteadOfParentheses [ "Test the link annotation [LinkText](url)" @@ -602,7 +604,7 @@ MicInlineParserTest >> testSplitBlockLinkWithBracketInsteadOfParentheses [ equals: { 'Text(abc[LinkText][myURL]last)' } ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicInlineParserTest >> testSplitBlockLinkWithParenthesesInsteadOfBracket [ "Test the link annotation [LinkText](url)" @@ -614,7 +616,7 @@ MicInlineParserTest >> testSplitBlockLinkWithParenthesesInsteadOfBracket [ equals: { 'Text(abc(LinkText)(myURL)last)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testStrike [ | res | @@ -625,7 +627,7 @@ MicInlineParserTest >> testStrike [ self assert: res second class equals: MicStrikeFormatBlock ] -{ #category : #'tests to make green again' } +{ #category : 'tests to make green again' } MicInlineParserTest >> testTwoConsecutiveEscapeCharacter [ "we should have just one escape" @@ -635,7 +637,7 @@ MicInlineParserTest >> testTwoConsecutiveEscapeCharacter [ self assert: (res collect: [ :x | x printString ]) equals: { 'Text(\)' } ] -{ #category : #'tests - annotation' } +{ #category : 'tests - annotation' } MicInlineParserTest >> testUnclosedAnnotation [ | res | @@ -645,7 +647,7 @@ MicInlineParserTest >> testUnclosedAnnotation [ equals: { 'Text(abcdef)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testUnclosedBold [ | res | @@ -653,7 +655,7 @@ MicInlineParserTest >> testUnclosedBold [ self assert: res first printString equals: 'Text(abc**xyz)' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicInlineParserTest >> testUnclosedFigure [ "Test the image annotation ![AltText](url)" @@ -664,7 +666,7 @@ MicInlineParserTest >> testUnclosedFigure [ equals: { 'Text(abc![AltText]last)' } ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicInlineParserTest >> testUnclosedMath [ | res | @@ -674,7 +676,7 @@ MicInlineParserTest >> testUnclosedMath [ equals: { 'Text(abc$ V)'. 'ItalicFormat(Text(i = C))'. 'Text(0 - C_3 &def)' } ] -{ #category : #tests } +{ #category : 'tests' } MicInlineParserTest >> testUnclosedOpeners [ | openers | openers := MicAbstractDelimiter subclasses select: [ :d | d hasSubclasses not and: [d isOpener ]] thenCollect: [ :d | d markup ]. @@ -685,7 +687,7 @@ MicInlineParserTest >> testUnclosedOpeners [ ] ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicInlineParserTest >> testUnclosedRaw [ | res | @@ -695,7 +697,7 @@ MicInlineParserTest >> testUnclosedRaw [ equals: { 'Text(abc{{ V)'. 'ItalicFormat(Text(i = C))'. 'Text(0 - C_3 &def)' } ] -{ #category : #'tests - formats' } +{ #category : 'tests - formats' } MicInlineParserTest >> testUnclosedStrike [ | res | @@ -705,7 +707,7 @@ MicInlineParserTest >> testUnclosedStrike [ equals: { 'Text(abc~strikeédef)' } ] -{ #category : #'tests - url' } +{ #category : 'tests - url' } MicInlineParserTest >> testUrlObjectInUrlBlocks [ | res | @@ -714,7 +716,7 @@ MicInlineParserTest >> testUrlObjectInUrlBlocks [ ] -{ #category : #'tests to make green again' } +{ #category : 'tests to make green again' } MicInlineParserTest >> testUrlObjectInUrlBlocks2 [ | res | @@ -724,7 +726,7 @@ MicInlineParserTest >> testUrlObjectInUrlBlocks2 [ self assert: res second reference fullName equals: 'https://github.com/Ducasse/NewTools-NewHelpBrowser/pulse#merged-pull-requests' ] -{ #category : #tests } +{ #category : 'tests' } MicInlineParserTest >> testWrappedElementOnBold [ | mic | mic := (self splitter parse: '**bold**') first. @@ -732,7 +734,7 @@ MicInlineParserTest >> testWrappedElementOnBold [ self assert: mic substring equals: 'bold' ] -{ #category : #tests } +{ #category : 'tests' } MicInlineParserTest >> testWrappedElementOnNested [ | mic | mic := (self splitter parse: '**_italic_**') first. diff --git a/src/Microdown-Tests/MicInputfileBlockTest.class.st b/src/Microdown-Tests/MicInputfileBlockTest.class.st index 30301eba..73c9ec39 100644 --- a/src/Microdown-Tests/MicInputfileBlockTest.class.st +++ b/src/Microdown-Tests/MicInputfileBlockTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #MicInputfileBlockTest, - #superclass : #MicAnnotationSubclassTest, - #category : #'Microdown-Tests-Extensions' + #name : 'MicInputfileBlockTest', + #superclass : 'MicAnnotationSubclassTest', + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } MicInputfileBlockTest >> testMicInputfileIsNotRelativeFilePath [ | mic resourceReference | "a path starting with / should give an absolute file reference" @@ -14,7 +16,7 @@ MicInputfileBlockTest >> testMicInputfileIsNotRelativeFilePath [ self assert: resourceReference path equals: '/chapters/withStyle.md' ] -{ #category : #tests } +{ #category : 'tests' } MicInputfileBlockTest >> testMicInputfileIsRelativeFilePath [ | mic infileReference | mic := parser parse: ''. @@ -23,7 +25,7 @@ MicInputfileBlockTest >> testMicInputfileIsRelativeFilePath [ self assert: infileReference relativePath equals: 'chapters/withStyle.md' ] -{ #category : #tests } +{ #category : 'tests' } MicInputfileBlockTest >> testMicInputfilePath [ | mic infileReference | mic := parser parse: ''. @@ -31,7 +33,7 @@ MicInputfileBlockTest >> testMicInputfilePath [ self assert: infileReference relativePath equals: 'chapters/withStyle.md' ] -{ #category : #tests } +{ #category : 'tests' } MicInputfileBlockTest >> testMicInputfilePathError [ | doc fileInputBlock | doc := parser parse: ''. diff --git a/src/Microdown-Tests/MicLinkBlockTest.class.st b/src/Microdown-Tests/MicLinkBlockTest.class.st index 6f090f9e..81cca056 100644 --- a/src/Microdown-Tests/MicLinkBlockTest.class.st +++ b/src/Microdown-Tests/MicLinkBlockTest.class.st @@ -1,14 +1,16 @@ Class { - #name : #MicLinkBlockTest, - #superclass : #MicBlockTest, + #name : 'MicLinkBlockTest', + #superclass : 'MicBlockTest', #instVars : [ 'splitterClass', 'link' ], - #category : #'Microdown-Tests-Parser' + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #functions } +{ #category : 'functions' } MicLinkBlockTest >> linkBoldSample [ ^ ' @@ -16,7 +18,7 @@ MicLinkBlockTest >> linkBoldSample [ ' ] -{ #category : #functions } +{ #category : 'functions' } MicLinkBlockTest >> linkItalicSample [ ^ ' @@ -24,7 +26,7 @@ MicLinkBlockTest >> linkItalicSample [ ' ] -{ #category : #functions } +{ #category : 'functions' } MicLinkBlockTest >> linkMonospaceSample [ ^ ' @@ -32,7 +34,7 @@ MicLinkBlockTest >> linkMonospaceSample [ ' ] -{ #category : #functions } +{ #category : 'functions' } MicLinkBlockTest >> linkNestedSample [ ^ ' @@ -40,14 +42,14 @@ MicLinkBlockTest >> linkNestedSample [ ' ] -{ #category : #functions } +{ #category : 'functions' } MicLinkBlockTest >> linkSample [ ^ ' [Foo](/anUrl) ' ] -{ #category : #functions } +{ #category : 'functions' } MicLinkBlockTest >> linkStrikeSample [ ^ ' @@ -55,14 +57,14 @@ MicLinkBlockTest >> linkStrikeSample [ ' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicLinkBlockTest >> parseLink: aString [ "Parse aString containing Microdown link to a MicLinkBlock" ^ (self parser parse: aString) children first children first. ] -{ #category : #running } +{ #category : 'running' } MicLinkBlockTest >> setUp [ super setUp. @@ -70,12 +72,12 @@ MicLinkBlockTest >> setUp [ splitterClass := MicInlineParser ] -{ #category : #tests } +{ #category : 'tests' } MicLinkBlockTest >> subjectClass [ ^ MicHorizontalLineBlock ] -{ #category : #tests } +{ #category : 'tests' } MicLinkBlockTest >> testFullName [ link := self parseLink: self linkSample. @@ -83,7 +85,7 @@ MicLinkBlockTest >> testFullName [ ] -{ #category : #tests } +{ #category : 'tests' } MicLinkBlockTest >> testHasArguments [ | figure | figure := (splitterClass new parse: '[caption with space and dot...](https://github.com/pillar-markup/Microdown/runs/4336482137?check_suite_focus=true width=80&anchor=bla)') first. @@ -94,7 +96,7 @@ MicLinkBlockTest >> testHasArguments [ ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicLinkBlockTest >> testLinkAPIToAccessText [ link := self parseLink: self linkSample. @@ -102,7 +104,7 @@ MicLinkBlockTest >> testLinkAPIToAccessText [ self assert: link url equals: '/anUrl' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicLinkBlockTest >> testLinkAPIToSetText [ link := self parseLink: self linkSample. @@ -112,7 +114,7 @@ MicLinkBlockTest >> testLinkAPIToSetText [ self assert: link caption equals: 'Blblbl' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicLinkBlockTest >> testLinkBoldAPIToAccessText [ link := self parseLink: self linkBoldSample. @@ -123,7 +125,7 @@ MicLinkBlockTest >> testLinkBoldAPIToAccessText [ self assert: link url equals: '/anUrl' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicLinkBlockTest >> testLinkCreatesInnerText [ link := self parseLink: '[ab](https://ab.com)'. @@ -131,7 +133,7 @@ MicLinkBlockTest >> testLinkCreatesInnerText [ self assert: link url equals: 'https://ab.com' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicLinkBlockTest >> testLinkItalicAPIToAccessText [ link := self parseLink: self linkItalicSample. @@ -144,7 +146,7 @@ MicLinkBlockTest >> testLinkItalicAPIToAccessText [ self assert: link url equals: '/anUrl' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicLinkBlockTest >> testOpeningDelimiter [ link := self parseLink: self linkSample. @@ -153,14 +155,14 @@ MicLinkBlockTest >> testOpeningDelimiter [ self assert: link openingDelimiter equals: '[' ] -{ #category : #tests } +{ #category : 'tests' } MicLinkBlockTest >> testPrintOn [ link := (splitterClass new parse: '[caption](http://www.pharo.org)') first. self assert: link asString equals: '[caption](http://www.pharo.org)' ] -{ #category : #tests } +{ #category : 'tests' } MicLinkBlockTest >> testUrl [ link := (splitterClass new parse: '[caption](http://www.pharo.org:8080)') first. diff --git a/src/Microdown-Tests/MicMathBlockTest.class.st b/src/Microdown-Tests/MicMathBlockTest.class.st index 941dabdf..dfc4dc58 100644 --- a/src/Microdown-Tests/MicMathBlockTest.class.st +++ b/src/Microdown-Tests/MicMathBlockTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicMathBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicMathBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> subjectClass [ ^ MicMathBlock ] -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> testMathBlockIsMathBlock [ | root | @@ -21,7 +23,7 @@ V_i = C_0 - C_3 self assert: root children first class equals: MicMathBlock ] -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> testMathBlockWithBackslashCommands [ "check that backslash are not expanded for math blocks" | root math | @@ -35,7 +37,7 @@ f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz self assert: math body equals: 'f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz'. ] -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> testMathBlockWithBadClosure [ | root | @@ -49,7 +51,7 @@ $'. $' ] -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> testMathBlockWithParameters [ | root math | @@ -65,7 +67,7 @@ V_i = C_0 - C_3 self assert: (math arguments at: 'label') equals: '42' ] -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> testMathBlockWithParametersAndLatexComment [ | root math | @@ -81,7 +83,7 @@ V_i = C_0 - C_3 self assert: (math arguments at: 'label') equals: '42' ] -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> testMathBlockWithParametersCaption [ | root math | @@ -103,7 +105,7 @@ V_i = C_0 - C_3 self assert: math caption equals: 'Ze great formula' ] -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> testMathBlockWithParametersCaptionAndFormatting [ | root math | @@ -126,7 +128,7 @@ V_i = C_0 - C_3 self assert: math captionElements second kind equals: 'bold' ] -{ #category : #tests } +{ #category : 'tests' } MicMathBlockTest >> testMathBlockWithParametersWithBlank [ | root math | diff --git a/src/Microdown-Tests/MicMetaDataBlockTest.class.st b/src/Microdown-Tests/MicMetaDataBlockTest.class.st index 9bd3eaea..3710cbc7 100644 --- a/src/Microdown-Tests/MicMetaDataBlockTest.class.st +++ b/src/Microdown-Tests/MicMetaDataBlockTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicMetaDataBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicMetaDataBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicMetaDataBlockTest >> subjectClass [ ^ MicMetaDataBlock ] -{ #category : #tests } +{ #category : 'tests' } MicMetaDataBlockTest >> testCorrectJSONMetaDataProducesDictionary [ | source root metadata | @@ -23,7 +25,7 @@ MicMetaDataBlockTest >> testCorrectJSONMetaDataProducesDictionary [ self assert: (metadata body at: 'title') equals: 'Pharo by Example'. ] -{ #category : #tests } +{ #category : 'tests' } MicMetaDataBlockTest >> testCorrectMetaDataWithEmptyLinesProduceJSON [ | source root metadata | @@ -42,7 +44,7 @@ MicMetaDataBlockTest >> testCorrectMetaDataWithEmptyLinesProduceJSON [ self assert: (metadata body at: 'title') equals: 'Pharo by Example'. ] -{ #category : #tests } +{ #category : 'tests' } MicMetaDataBlockTest >> testMetaDataEatsOtherBlocks [ "this is normal since { @@ -65,7 +67,7 @@ then it eats. ] -{ #category : #tests } +{ #category : 'tests' } MicMetaDataBlockTest >> testParse [ | source root metadata | @@ -82,7 +84,7 @@ MicMetaDataBlockTest >> testParse [ ] -{ #category : #tests } +{ #category : 'tests' } MicMetaDataBlockTest >> testUncorrectJSONMetaDataProducesDictionaryWithContents [ | source root metadata | @@ -98,7 +100,7 @@ MicMetaDataBlockTest >> testUncorrectJSONMetaDataProducesDictionaryWithContents ] -{ #category : #tests } +{ #category : 'tests' } MicMetaDataBlockTest >> testUncorrectJSONMetaDataProducesDictionaryWithContents2 [ | source root metadata | @@ -114,7 +116,7 @@ title" : "Pharo by Example"'. ] -{ #category : #tests } +{ #category : 'tests' } MicMetaDataBlockTest >> testUncorrectJSONMetaDataProducesDictionaryWithContents3 [ | source root metadata | diff --git a/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st b/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st index 3a248903..a3b594ca 100644 --- a/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st +++ b/src/Microdown-Tests/MicMicrodownSnippetFactory.class.st @@ -20,18 +20,20 @@ Internal Representation and Key Implementation Points. This class uses Microdown as parser, but it could be specialized to change the parser class rewriting the initialize method. " Class { - #name : #MicMicrodownSnippetFactory, - #superclass : #Object, + #name : 'MicMicrodownSnippetFactory', + #superclass : 'Object', #instVars : [ 'parserClass' ], #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Tests-Snippets' + #category : 'Microdown-Tests-Snippets', + #package : 'Microdown-Tests', + #tag : 'Snippets' } -{ #category : #utilities } +{ #category : 'utilities' } MicMicrodownSnippetFactory class >> buildDocument [ "Answer a with a whole document made up from the receiver's methods containing Microdown samples" @@ -49,41 +51,41 @@ MicMicrodownSnippetFactory class >> buildDocument [ << (factory perform: elementTypeSelector) ] ] ] ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> anchorAreTrimedSample [ ^ AnchorMarkup, ' test ' ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> anchorReferenceSample [ ^ '*@Foo@*' ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> anchorSample [ ^ AnchorMarkup, 'test' ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> anchorWithNewLineSample [ ^ AnchorMarkup , 'foo' , self newLine ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> anchorWithSpaceInsideSample [ ^ AnchorMarkup, 'foo bar' ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> annotatedSample [ ^ '!!label Foo _bar_ ' ] -{ #category : #annotations } +{ #category : 'annotations' } MicMicrodownSnippetFactory >> annotationSample [ ^ ' @@ -91,13 +93,13 @@ abc', AnnotationOpenerMarkup , 'Foo | value=aFoo&label=42 ', AnnotationCloserMa ' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockParameterWithLiteralArraySample [ ^ self codeblock: 'foo=#(1 2 true)' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockSampleOnMultipleLines [ ^ self codeblockNoParamBody: 'first line @@ -105,55 +107,55 @@ second line third line **b**' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithLanguageSample [ ^ self codeblock: 'language=smalltalk' body: 'foo' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithNewLineSample [ ^ (self codeblockNoParamBody: 'foo') , self newLine ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithParameterTrueByDefaultSample [ ^ self codeblock: 'foo' body: 'bar' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithParameterWithFloatSample [ ^ self codeblock: 'ratio=0.8' body: 'bar' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithParameterWithLiteralArraySample [ ^ self codeblock: 'foo=#(1 2 true)' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithParameterWithNoValuesSample [ ^ self codeblock: 'foo=' body: 'bar' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithParametersSample [ ^ self codeblock: 'foo=true&bar=2' body: 'bla' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithParametersWithCaptionSample [ ^ self codeblock: 'caption=`Color` is beautifull&bar=2' body: 'bla' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithSpaceAtTheEndSample [ ^ (self codeblockNoParamBody: 'foo'), ' '. @@ -161,31 +163,31 @@ MicMicrodownSnippetFactory >> blockWithSpaceAtTheEndSample [ ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> blockWithSpacedParametersSample [ ^ self codeblock: ' foo = true & bar = 2' body: 'bla' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> boldFormatEmptySample [ ^ self surround: '' withMarkup: BoldMarkup ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> boldFormatSample [ ^ self surroundWithMarkup: BoldMarkup ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> codeBlockSample [ ^ ' ```ab``` ' ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> codeblock: param [ ^ String streamContents: [ :st | @@ -197,7 +199,7 @@ MicMicrodownSnippetFactory >> codeblock: param [ ] ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> codeblock: param body: body [ ^ String streamContents: [ :st | @@ -211,7 +213,7 @@ MicMicrodownSnippetFactory >> codeblock: param body: body [ ] ] -{ #category : #'code block' } +{ #category : 'code block' } MicMicrodownSnippetFactory >> codeblockNoParamBody: body [ ^ String streamContents: [ :st | @@ -224,20 +226,20 @@ MicMicrodownSnippetFactory >> codeblockNoParamBody: body [ ] ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> columnSample [ ^ EnvironmentOpeningBlockMarkup, 'column|width=42 this is a **text** ',EnvironmentClosingBlockMarkup ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> columnsSample [ ^ EnvironmentOpeningBlockMarkup, 'columns|width=42 ',EnvironmentClosingBlockMarkup ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> columnsWithChildrenSample [ ^ EnvironmentOpeningBlockMarkup,'columns|width=42 ', self columnSample ,' @@ -245,17 +247,17 @@ MicMicrodownSnippetFactory >> columnsWithChildrenSample [ ',EnvironmentClosingBlockMarkup ] -{ #category : #block } +{ #category : 'block' } MicMicrodownSnippetFactory >> commentSample [ ^ '% Foo' ] -{ #category : #utilities } +{ #category : 'utilities' } MicMicrodownSnippetFactory >> documentFrom: aString [ ^ parserClass new parse: aString ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> environmentSample [ ^ ' @@ -266,7 +268,7 @@ Foo ',EnvironmentClosingBlockMarkup ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> environmentWithInnerBlockSample [ ^ ' ',EnvironmentOpeningBlockMarkup,'Foo|value=aFoo&label=42 @@ -282,7 +284,7 @@ This is a codeBlock ',EnvironmentClosingBlockMarkup ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> figureBoldSample [ ^ ' @@ -290,7 +292,7 @@ MicMicrodownSnippetFactory >> figureBoldSample [ ' ] -{ #category : #figures } +{ #category : 'figures' } MicMicrodownSnippetFactory >> figureGoutDeFraise [ ^ ' @@ -298,7 +300,7 @@ MicMicrodownSnippetFactory >> figureGoutDeFraise [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> figureItalicSample [ ^ ' @@ -307,7 +309,7 @@ MicMicrodownSnippetFactory >> figureItalicSample [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> figureMonospaceSample [ ^ ' @@ -316,7 +318,7 @@ MicMicrodownSnippetFactory >> figureMonospaceSample [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> figureNestedSample [ ^ ' @@ -325,7 +327,7 @@ MicMicrodownSnippetFactory >> figureNestedSample [ ' ] -{ #category : #figures } +{ #category : 'figures' } MicMicrodownSnippetFactory >> figureRealSample [ ^ ' @@ -333,7 +335,7 @@ MicMicrodownSnippetFactory >> figureRealSample [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> figureSample [ ^ ' @@ -342,7 +344,7 @@ MicMicrodownSnippetFactory >> figureSample [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> figureSampleWithoutSizeAndLabel [ ^ ' @@ -351,7 +353,7 @@ MicMicrodownSnippetFactory >> figureSampleWithoutSizeAndLabel [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> figureStrikeSample [ ^ ' @@ -360,7 +362,7 @@ MicMicrodownSnippetFactory >> figureStrikeSample [ ' ] -{ #category : #figures } +{ #category : 'figures' } MicMicrodownSnippetFactory >> figureWithLabelWithoutSizeSample [ ^ ' @@ -369,7 +371,7 @@ MicMicrodownSnippetFactory >> figureWithLabelWithoutSizeSample [ ' ] -{ #category : #figures } +{ #category : 'figures' } MicMicrodownSnippetFactory >> figureWithoutCaptionSample [ ^ ' @@ -378,7 +380,7 @@ MicMicrodownSnippetFactory >> figureWithoutCaptionSample [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> fileFigureSample [ ^ ' @@ -387,60 +389,60 @@ MicMicrodownSnippetFactory >> fileFigureSample [ ' ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> footnoteSample [ ^ AnnotationOpenerMarkup ,'footnote|note=Pharo is cool', AnnotationCloserMarkup ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerEmptySample [ ^ self newLine , HeaderMarkup ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerLevel1Sample [ ^ self newLine , (self headerLevel: 1) ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerLevel2Sample [ ^ self newLine , (self headerLevel: 2) ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerLevel3Sample [ ^ self newLine , (self headerLevel: 3) ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerLevel3SampleWithNewLine [ ^ self newLine , (self headerLevel: 3) , self newLine ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerLevel4Sample [ ^ self newLine , (self headerLevel: 4) ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerLevel5Sample [ ^ self newLine , (self headerLevel: 5) ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerLevel6Sample [ ^ self newLine , (self headerLevel: 6) ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerLevel: n [ ^ String streamContents: [ :st | @@ -448,121 +450,121 @@ MicMicrodownSnippetFactory >> headerLevel: n [ st nextPutAll: ' Foo'] ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerWithFormatSample [ ^ self newLine , HeaderMarkup , self space , self boldFormatSample ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerWithFormatSampleWithNewLine [ ^ self headerWithFormatSample, self newLine ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerWithNestedFormatSampleWithNewLine [ ^ self newLine , HeaderMarkup , self space , self nestedBoldFormatSample , self newLine ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> headerWithNewLineSample [ ^ self newLine , HeaderMarkup , 'Foo' , self newLine ] -{ #category : #headers } +{ #category : 'headers' } MicMicrodownSnippetFactory >> horizontalLineSample [ ^ HorizontalLineMarkup , self newLine ] -{ #category : #initialization } +{ #category : 'initialization' } MicMicrodownSnippetFactory >> initialize [ super initialize. parserClass := Microdown ] -{ #category : #inputFile } +{ #category : 'inputFile' } MicMicrodownSnippetFactory >> inputfileSample [ ^ EnvironmentOpeningBlockMarkup , 'inputFile | path=Chapters/text.md', EnvironmentClosingBlockMarkup ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> italicFormatEmptySample [ ^ self surround: '' withMarkup: ItalicMarkup ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> italicFormatSample [ ^ self surroundWithMarkup: ItalicMarkup ] -{ #category : #document } +{ #category : 'document' } MicMicrodownSnippetFactory >> lineEndSample [ ^ '' ] -{ #category : #document } +{ #category : 'document' } MicMicrodownSnippetFactory >> lineEndwithNewlineSample [ ^ String lf ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> linkBoldSample [ ^ ' [**Foo**](/anUrl) ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> linkHttpSample [ ^ ' [Foo](http://pharo.org/Community/) ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> linkItalicSample [ ^ ' [_Foo_](/anUrl) ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> linkMonospaceSample [ ^ ' [`Foo`](/anUrl) ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> linkNestedSample [ ^ ' [**_Foo_**](/anUrl) ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> linkSample [ ^ ' [Foo](/anUrl) ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> linkStrikeSample [ ^ ' [~Foo~](/anUrl) ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> listMultiSample [ | unordered | @@ -576,35 +578,35 @@ MicMicrodownSnippetFactory >> listMultiSample [ , unordered , '2. 8' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> listWithCommentSample [ ^ '1. Foo %Comment 2. Bar' ] -{ #category : #math } +{ #category : 'math' } MicMicrodownSnippetFactory >> mathInlineSample [ ^ ' $V_i = C_0 - C_3$ ' ] -{ #category : #math } +{ #category : 'math' } MicMicrodownSnippetFactory >> mathParametersSample [ ^ MathOpeningBlockMarkup, 'label=42 Foo ', MathClosingBlockMarkup ] -{ #category : #math } +{ #category : 'math' } MicMicrodownSnippetFactory >> mathParametersWithCaptionSample [ ^ MathOpeningBlockMarkup, 'caption=`Math` is good&label=42 Foo ', MathClosingBlockMarkup. ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> metaDataSample [ ^ '{ "author": "G. Foo", @@ -613,23 +615,23 @@ MicMicrodownSnippetFactory >> metaDataSample [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> monospaceFormatEmptySample [ ^ self surround: '' withMarkup: MonospaceMarkup ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> monospaceFormatSample [ ^ self surroundWithMarkup: MonospaceMarkup ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> nestedBoldFormatSample [ "self new nestedBoldFormatSample" ^ self surround: (self surround: 'Foo' withMarkup: BoldMarkup) withMarkup: ItalicMarkup ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> nestedOrderedList2Sample [ ^ ' - Foo @@ -643,7 +645,7 @@ MicMicrodownSnippetFactory >> nestedOrderedList2Sample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> nestedOrderedListSample [ ^ ' - Foo @@ -654,7 +656,7 @@ MicMicrodownSnippetFactory >> nestedOrderedListSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> nestedUnorderedListSample [ ^ ' - Foo @@ -665,41 +667,41 @@ MicMicrodownSnippetFactory >> nestedUnorderedListSample [ ' ] -{ #category : #utilities } +{ #category : 'utilities' } MicMicrodownSnippetFactory >> newLine [ ^ String cr ] -{ #category : #document } +{ #category : 'document' } MicMicrodownSnippetFactory >> newlineCRLFSample [ ^ String crlf ] -{ #category : #document } +{ #category : 'document' } MicMicrodownSnippetFactory >> newlineCRSample [ ^ self newLine ] -{ #category : #document } +{ #category : 'document' } MicMicrodownSnippetFactory >> newlineLFSample [ ^ String lf ] -{ #category : #document } +{ #category : 'document' } MicMicrodownSnippetFactory >> newlineSample [ ^ Smalltalk os lineEnding ] -{ #category : #inputFile } +{ #category : 'inputFile' } MicMicrodownSnippetFactory >> oneLineInputFileSample [ ^ EnvironmentOpeningBlockMarkup , 'inputFile | path=Chapters/text.md', EnvironmentClosingBlockMarkup ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> oneSlide [ ^ '> oneSlide [ !>' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> orderedListEmptySample [ ^ ' 1. ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> orderedListSample [ ^ ' 1. Foo ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> orderedListWithTwoItemsBoldFirstSample [ ^ @@ -733,7 +735,7 @@ MicMicrodownSnippetFactory >> orderedListWithTwoItemsBoldFirstSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> orderedListWithTwoItemsBoldSample [ ^ @@ -743,7 +745,7 @@ MicMicrodownSnippetFactory >> orderedListWithTwoItemsBoldSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> orderedListWithTwoItemsItalicSample [ ^ @@ -753,7 +755,7 @@ MicMicrodownSnippetFactory >> orderedListWithTwoItemsItalicSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> orderedListWithTwoItemsMonospaceSample [ ^ @@ -763,7 +765,7 @@ MicMicrodownSnippetFactory >> orderedListWithTwoItemsMonospaceSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> orderedListWithTwoItemsSample [ ^ @@ -773,7 +775,7 @@ MicMicrodownSnippetFactory >> orderedListWithTwoItemsSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> orderedListWithTwoItemsStrikeSample [ ^ @@ -783,65 +785,65 @@ MicMicrodownSnippetFactory >> orderedListWithTwoItemsStrikeSample [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> paragraphBoldSample [ ^ ' this is a **paragraph** ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> paragraphItalicSample [ ^ ' this is a _paragraph_ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> paragraphMonospaceSample [ ^ ' this is a `paragraph` ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> paragraphNestedSample [ ^ ' this is a **_paragraph_** ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> paragraphOnMultipleLinesSample [ ^ 'Je ne connais pas la peur, car la peur tue l''esprit. La peur est la petite mort qui conduit à l''oblitération totale. J''affonterai ma peur. Je lui permettrais de passer sur moi, au travers de moi. Et lorsqu''elle sera passée, je tournerai mon oeil interieur sur son chemin. Et là où elle sera passée, il n''y aura plus rien, rien que moi.' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> paragraphSample [ ^ ' Foo ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> paragraphStrikeSample [ ^ ' this is a ~paragraph~ ' ] -{ #category : #utilities } +{ #category : 'utilities' } MicMicrodownSnippetFactory >> parserClass [ ^ parserClass ] -{ #category : #anchor } +{ #category : 'anchor' } MicMicrodownSnippetFactory >> quoteSample [ ^ '> Foo' ] -{ #category : #figures } +{ #category : 'figures' } MicMicrodownSnippetFactory >> rawFormatInline [ ^ ' @@ -849,21 +851,21 @@ a{{_$Foo_}}b ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> rawFormatSample [ ^ ' a{{Foo}}b ' ] -{ #category : #figures } +{ #category : 'figures' } MicMicrodownSnippetFactory >> realLinkSample [ ^ ' [The Pharo Project](http://www.pharo.org) ' ] -{ #category : #document } +{ #category : 'document' } MicMicrodownSnippetFactory >> rootSample [ | stream | @@ -876,51 +878,51 @@ MicMicrodownSnippetFactory >> rootSample [ ^ stream contents ] -{ #category : #'code block parameter' } +{ #category : 'code block parameter' } MicMicrodownSnippetFactory >> scriptParameterEscapeSample [ ^ 'value\==foo' ] -{ #category : #'code block parameter' } +{ #category : 'code block parameter' } MicMicrodownSnippetFactory >> scriptParameterSample [ ^ 'value=foo' ] -{ #category : #'code block parameter' } +{ #category : 'code block parameter' } MicMicrodownSnippetFactory >> scriptParameterValueSample [ ^ '=foo' ] -{ #category : #'code block parameter' } +{ #category : 'code block parameter' } MicMicrodownSnippetFactory >> scriptParameterWithSpacesBeforeAndAfterSample [ ^ ' foo = true & bar = 2 ' ] -{ #category : #'code block parameter' } +{ #category : 'code block parameter' } MicMicrodownSnippetFactory >> scriptParameterWithoutValueSample [ ^ 'foo' ] -{ #category : #'code block parameter' } +{ #category : 'code block parameter' } MicMicrodownSnippetFactory >> scriptParametersEscapeSample [ ^ 'value=foo\&&bar ' ] -{ #category : #'code block parameter' } +{ #category : 'code block parameter' } MicMicrodownSnippetFactory >> scriptParametersMultipleSample [ ^ 'value=foo&bar ' ] -{ #category : #'code block parameter' } +{ #category : 'code block parameter' } MicMicrodownSnippetFactory >> scriptTwoParametersNoValueSample [ ^ 'foo&bar ' ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> simpleTable [ ^ ' | aaab | jkhjh | @@ -928,7 +930,7 @@ MicMicrodownSnippetFactory >> simpleTable [ | bar | rab |' ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> simpleTableFormat [ ^ ' | **aaab** | jkhjh | @@ -936,7 +938,7 @@ MicMicrodownSnippetFactory >> simpleTableFormat [ | bar | rab |' ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> simpleTableMoreFormat [ ^ ' | **aaab** bbbc _cccd_ | jkhjh | @@ -944,7 +946,7 @@ MicMicrodownSnippetFactory >> simpleTableMoreFormat [ | bar | rab |' ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> simpleTableShortRow [ ^ ' | aaab | jkhjh | @@ -952,40 +954,40 @@ MicMicrodownSnippetFactory >> simpleTableShortRow [ | bar |' ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> simpleTableWithoutHeaderTable [ ^ ' | aaab | jkhjh | | bar | rab |' ] -{ #category : #utilities } +{ #category : 'utilities' } MicMicrodownSnippetFactory >> space [ ^ String space ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> strikethroughFormatEmptySample [ ^ self surround: '' withMarkup: StrikeMarkup ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> strikethroughFormatSample [ ^ self surroundWithMarkup: StrikeMarkup ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> surround: aWord withMarkup: aMarkup [ ^ (aMarkup, aWord, aMarkup) asString ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> surroundWithMarkup: aMarkup [ ^ self surround: 'Foo' withMarkup: aMarkup ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> tableSample [ ^ '| aaab | jkhjh | | --- | --- | @@ -993,19 +995,19 @@ MicMicrodownSnippetFactory >> tableSample [ ' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> textSentenceSample [ ^ 'Je ne connaitrais pas la peur' ] -{ #category : #format } +{ #category : 'format' } MicMicrodownSnippetFactory >> textWithChevron [ ^ 'Pilou >> bla' ] -{ #category : #sample } +{ #category : 'sample' } MicMicrodownSnippetFactory >> trySlide [ ^ '> trySlide [ !>' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListEmptySample [ ^ UnorderedListMarkup ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListSample [ ^ ' @@ -1031,7 +1033,7 @@ MicMicrodownSnippetFactory >> unorderedListSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListWithSubListSample [ | listMarkup | @@ -1040,7 +1042,7 @@ MicMicrodownSnippetFactory >> unorderedListWithSubListSample [ , listMarkup , 'Bar' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListWithTwoItemsBoldSample [ | listMarkup | @@ -1050,7 +1052,7 @@ MicMicrodownSnippetFactory >> unorderedListWithTwoItemsBoldSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListWithTwoItemsItalicSample [ | listMarkup | @@ -1060,7 +1062,7 @@ MicMicrodownSnippetFactory >> unorderedListWithTwoItemsItalicSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListWithTwoItemsMonospaceSample [ | listMarkup | @@ -1070,7 +1072,7 @@ MicMicrodownSnippetFactory >> unorderedListWithTwoItemsMonospaceSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListWithTwoItemsNestedSample [ | listMarkup | @@ -1080,7 +1082,7 @@ MicMicrodownSnippetFactory >> unorderedListWithTwoItemsNestedSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListWithTwoItemsSample [ | listMarkup | @@ -1090,7 +1092,7 @@ MicMicrodownSnippetFactory >> unorderedListWithTwoItemsSample [ ' ] -{ #category : #list } +{ #category : 'list' } MicMicrodownSnippetFactory >> unorderedListWithTwoItemsStrikeSample [ | listMarkup | diff --git a/src/Microdown-Tests/MicMicrodownTextualBuilderTest.class.st b/src/Microdown-Tests/MicMicrodownTextualBuilderTest.class.st index de04826e..16a8b8ef 100644 --- a/src/Microdown-Tests/MicMicrodownTextualBuilderTest.class.st +++ b/src/Microdown-Tests/MicMicrodownTextualBuilderTest.class.st @@ -2,8 +2,8 @@ A MicMicrodownTextualBuilderTest is a test class for testing the behavior of MicMicrodownTextualBuilder " Class { - #name : #MicMicrodownTextualBuilderTest, - #superclass : #TestCase, + #name : 'MicMicrodownTextualBuilderTest', + #superclass : 'TestCase', #instVars : [ 'factory', 'builder' @@ -11,35 +11,37 @@ Class { #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Tests-Builder' + #category : 'Microdown-Tests-Builder', + #package : 'Microdown-Tests', + #tag : 'Builder' } -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicMicrodownTextualBuilderTest >> exampleMathTextMultipleLines [ ^ 'y = 3 x = 2 + y' ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicMicrodownTextualBuilderTest >> exampleTextMultipleLines [ ^ 'Hello Pharo' ] -{ #category : #running } +{ #category : 'running' } MicMicrodownTextualBuilderTest >> setUp [ super setUp. factory := MicMicrodownSnippetFactory new. builder := Microdown builder ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testAnchor [ self assert: (builder anchor: 'Anchor') contents equals: AnchorMarkup, 'Anchor' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testAnchorReference [ self @@ -47,13 +49,13 @@ MicMicrodownTextualBuilderTest >> testAnchorReference [ equals: AnchorReferenceOpenerMarkup, 'AnchorReference', AnchorReferenceCloserMarkup ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testAnnotated [ self assert: (builder annotated: 'anAnnotation' paragraph: [ builder text: 'anAnnotatedParagraph' ]) contents equals: '!!anAnnotation anAnnotatedParagraph', String cr ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testAnnotation [ self @@ -61,7 +63,7 @@ MicMicrodownTextualBuilderTest >> testAnnotation [ equals: AnnotationOpenerMarkup,'anAnnotationName | label=aLabel&value=42', AnnotationCloserMarkup ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testAnnotationNoArgs [ self @@ -69,13 +71,13 @@ MicMicrodownTextualBuilderTest >> testAnnotationNoArgs [ equals: AnnotationOpenerMarkup, 'anAnnotationName', AnnotationCloserMarkup ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicMicrodownTextualBuilderTest >> testBold [ self assert: (builder bold: [builder text: 'Bold']) contents equals: '**Bold**' ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownTextualBuilderTest >> testCell [ self @@ -86,7 +88,7 @@ MicMicrodownTextualBuilderTest >> testCell [ equals: '| this is **bold** ' ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicMicrodownTextualBuilderTest >> testCodeBlock [ "```language2=Pharo&caption=`Color` is cool @@ -112,7 +114,7 @@ MicMicrodownTextualBuilderTest >> testCodeBlock [ ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicMicrodownTextualBuilderTest >> testCodeBlockCaptionContainsMonospace [ "```language2=Pharo&caption=`Color` is cool @@ -140,7 +142,7 @@ MicMicrodownTextualBuilderTest >> testCodeBlockCaptionContainsMonospace [ ] -{ #category : #'tests - slides' } +{ #category : 'tests - slides' } MicMicrodownTextualBuilderTest >> testColumns [ self @@ -153,7 +155,7 @@ This is a paragraph in a columns ' ] -{ #category : #'tests - slides' } +{ #category : 'tests - slides' } MicMicrodownTextualBuilderTest >> testColumnsWithChildren [ self @@ -173,13 +175,13 @@ This is a paragraph in a column ' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testComment [ self assert: (builder comment: 'Comment') contents equals: CommentedLineMarkup, ' Comment' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testEnvironment [ self @@ -188,7 +190,7 @@ MicMicrodownTextualBuilderTest >> testEnvironment [ !>' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testEnvironmentWithBody [ self @@ -200,7 +202,7 @@ aText !>' ] -{ #category : #'tests - references' } +{ #category : 'tests - references' } MicMicrodownTextualBuilderTest >> testExternalLink [ self @@ -208,7 +210,7 @@ MicMicrodownTextualBuilderTest >> testExternalLink [ equals: '[aDescription](anUrl)' ] -{ #category : #'tests - references' } +{ #category : 'tests - references' } MicMicrodownTextualBuilderTest >> testExternalLinkWithBold [ self @@ -216,7 +218,7 @@ MicMicrodownTextualBuilderTest >> testExternalLinkWithBold [ equals: '[**aDescription**](anUrl)' ] -{ #category : #'tests - references' } +{ #category : 'tests - references' } MicMicrodownTextualBuilderTest >> testExternalLinkWithItalic [ self @@ -224,7 +226,7 @@ MicMicrodownTextualBuilderTest >> testExternalLinkWithItalic [ equals: '[_aDescription_](anUrl)' ] -{ #category : #'tests - references' } +{ #category : 'tests - references' } MicMicrodownTextualBuilderTest >> testExternalLinkWithMonospace [ self @@ -232,7 +234,7 @@ MicMicrodownTextualBuilderTest >> testExternalLinkWithMonospace [ equals: '[`aDescription`](anUrl)' ] -{ #category : #'tests - references' } +{ #category : 'tests - references' } MicMicrodownTextualBuilderTest >> testExternalLinkWithNested [ self @@ -240,7 +242,7 @@ MicMicrodownTextualBuilderTest >> testExternalLinkWithNested [ equals: '[**_aDescription_**](anUrl)' ] -{ #category : #'tests - references' } +{ #category : 'tests - references' } MicMicrodownTextualBuilderTest >> testExternalLinkWithStrike [ self @@ -248,7 +250,7 @@ MicMicrodownTextualBuilderTest >> testExternalLinkWithStrike [ contents equals: '[~aDescription~](anUrl)' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicMicrodownTextualBuilderTest >> testFigureInPresenceOfParagraph [ | dictionnary | dictionnary := {'label'->'aLabel' . 'size'->'80'} asOrderedDictionary. @@ -264,7 +266,7 @@ MicMicrodownTextualBuilderTest >> testFigureInPresenceOfParagraph [ ![it is a beautifull figure](http://www.pharo.org/files/ouf.png label=aLabel&size=80)' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicMicrodownTextualBuilderTest >> testFigureWithBold [ self @@ -275,7 +277,7 @@ MicMicrodownTextualBuilderTest >> testFigureWithBold [ equals: '![it is a**beautifull**figure](http://www.pharo.org/light.jpeg)' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicMicrodownTextualBuilderTest >> testFigureWithParameters [ | dictionnary | dictionnary := {'label'->'aLabel' . 'size'->'80'} asOrderedDictionary. @@ -288,12 +290,12 @@ MicMicrodownTextualBuilderTest >> testFigureWithParameters [ equals: '![it is a beautifull figure](http://www.pharo.org/flo.png label=aLabel&size=80)' ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownTextualBuilderTest >> testHeadCell [ self assert: builder headCell contents equals: '| --- ' ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicMicrodownTextualBuilderTest >> testHeaderWithItalic [ self @@ -306,7 +308,7 @@ MicMicrodownTextualBuilderTest >> testHeaderWithItalic [ ' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testHorizontalLine [ self @@ -314,7 +316,7 @@ MicMicrodownTextualBuilderTest >> testHorizontalLine [ equals: HorizontalLineMarkup, String cr ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testInputfile [ self @@ -323,13 +325,13 @@ MicMicrodownTextualBuilderTest >> testInputfile [ ',EnvironmentOpeningBlockMarkup ,'inputFile|path=Chapters/image.png', EnvironmentClosingBlockMarkup ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicMicrodownTextualBuilderTest >> testItalic [ self assert: (builder italic: [ builder text: 'Italic' ]) contents equals: '_Italic_' ] -{ #category : #'tests - codeblock' } +{ #category : 'tests - codeblock' } MicMicrodownTextualBuilderTest >> testMathBlockCaptionContainsMonospace [ "```language2=Pharo&caption=`Color` is cool @@ -354,13 +356,13 @@ MathOpeningBlockMarkup, 'label=Math&caption=`Math` is cool ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testMathInline [ self assert: (builder mathInline: 'x = 2 + y') contents equals: '$x = 2 + y$' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testMetaData [ self @@ -368,13 +370,13 @@ MicMicrodownTextualBuilderTest >> testMetaData [ equals: MetaDataOpeningBlockMarkup , String cr ,'"label" : "aLabel",' , String cr, '"size" : "142"', String cr , MetaDataClosingBlockMarkup ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicMicrodownTextualBuilderTest >> testMonospace [ self assert: (builder monospace: 'Monospace') contents equals: '`Monospace`' ] -{ #category : #'tests - slides' } +{ #category : 'tests - slides' } MicMicrodownTextualBuilderTest >> testOneColumn [ self @@ -389,7 +391,7 @@ This is a paragraph in a column ' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testOrderedListDuring [ self @@ -402,32 +404,32 @@ MicMicrodownTextualBuilderTest >> testOrderedListDuring [ ' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testParagraph [ self assert: (builder paragraph: [ builder text: 'aParagraph' ]) contents equals: 'aParagraph', String cr ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testQuoteBlock [ self assert: (builder quoteBlock: 'aQuote') contents equals: PreformattedMarkup, ' aQuote' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testRawFormat [ self assert: (builder rawFormat: 'aRawFormat') contents equals: RawOpenerMarkup, 'aRawFormat', RawCloserMarkup ] -{ #category : #tests } +{ #category : 'tests' } MicMicrodownTextualBuilderTest >> testRawParametersWithNotStringAtValue [ builder rawParameters: { 'label'->42 . 'size'->MicTextBlock } asDictionary. self assert: builder contents equals: 'label=42&size=MicTextBlock' ] -{ #category : #'tests - slides' } +{ #category : 'tests - slides' } MicMicrodownTextualBuilderTest >> testSimpleSlide [ self @@ -441,13 +443,13 @@ This is a paragraph in a slide ' ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicMicrodownTextualBuilderTest >> testStrike [ self assert: (builder strike: [ builder text: 'Strike']) contents equals: '~Strike~' ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicMicrodownTextualBuilderTest >> testStrikeInHeader [ self assert: (builder @@ -460,7 +462,7 @@ MicMicrodownTextualBuilderTest >> testStrikeInHeader [ ' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicMicrodownTextualBuilderTest >> testUnorderedList [ self diff --git a/src/Microdown-Tests/MicOrderedListBlockTest.class.st b/src/Microdown-Tests/MicOrderedListBlockTest.class.st index 99031650..2b8bbe90 100644 --- a/src/Microdown-Tests/MicOrderedListBlockTest.class.st +++ b/src/Microdown-Tests/MicOrderedListBlockTest.class.st @@ -2,17 +2,19 @@ I'm a test class for testing the behavior of ordered list blocks " Class { - #name : #MicOrderedListBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicOrderedListBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #factory } +{ #category : 'factory' } MicOrderedListBlockTest >> orderedListBlockClass [ ^ MicOrderedListBlock ] -{ #category : #functions } +{ #category : 'functions' } MicOrderedListBlockTest >> orderedListWithTwoItemsBoldFirstSample [ ^ ' @@ -21,12 +23,12 @@ MicOrderedListBlockTest >> orderedListWithTwoItemsBoldFirstSample [ ' ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> subjectClass [ ^ MicOrderedListBlock ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> testEmbeddedUnordered [ | source root list | source := @@ -49,7 +51,7 @@ MicOrderedListBlockTest >> testEmbeddedUnordered [ children second children first text equals: 'sublevel item 1'. ] -{ #category : #'tests - nested' } +{ #category : 'tests - nested' } MicOrderedListBlockTest >> testNestedLevel [ | source root list item1 | source := @@ -77,7 +79,7 @@ MicOrderedListBlockTest >> testNestedLevel [ ] -{ #category : #'tests - nested' } +{ #category : 'tests - nested' } MicOrderedListBlockTest >> testNestedLevel2 [ | source root list item1 sublevelItem | source := @@ -107,7 +109,7 @@ MicOrderedListBlockTest >> testNestedLevel2 [ ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> testNotSpawingNewParagraph [ | root list | root := parser @@ -126,7 +128,7 @@ follow up of second item'. ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> testSingleLevelList2 [ | source root list | source := @@ -141,7 +143,7 @@ expanded'. self assert: list startIndex equals: 19 ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> testSingleLevelList2WithNoIndent [ "when we want a paragraph to be part of an item it should be indented " @@ -163,7 +165,7 @@ expanded as new paragraph part of item2' ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> testSingleLevelListWithNormalNumbering [ | root list | root := parser @@ -178,7 +180,7 @@ MicOrderedListBlockTest >> testSingleLevelListWithNormalNumbering [ ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> testSingleLevelListWithNormalNumberingWithEmptyLines [ | root list | root := parser @@ -197,7 +199,7 @@ MicOrderedListBlockTest >> testSingleLevelListWithNormalNumberingWithEmptyLines ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> testSingleLevelListWithStrangelyNumberedItems [ | root list | root := parser @@ -211,7 +213,7 @@ MicOrderedListBlockTest >> testSingleLevelListWithStrangelyNumberedItems [ self assert: list children second text equals: 'item 2' ] -{ #category : #tests } +{ #category : 'tests' } MicOrderedListBlockTest >> testSpawingNewParagraph [ | root | root := parser @@ -230,7 +232,7 @@ follow up of second item'. ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicOrderedListBlockTest >> testUnOrderedListAPIToAccessText [ | list | diff --git a/src/Microdown-Tests/MicParagraphBlockTest.class.st b/src/Microdown-Tests/MicParagraphBlockTest.class.st index 4066b730..6a65a022 100644 --- a/src/Microdown-Tests/MicParagraphBlockTest.class.st +++ b/src/Microdown-Tests/MicParagraphBlockTest.class.st @@ -2,17 +2,19 @@ I'm is a test class for testing the behavior of paragraph block. " Class { - #name : #MicParagraphBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicParagraphBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> subjectClass [ ^ MicParagraphBlock ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testANewLineCreatesANewParagraph [ "**Hello @@ -28,7 +30,7 @@ a paragraph on two lines**'. ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testBoldMultipleLinesWithNewLine [ | root | @@ -55,7 +57,7 @@ another line** and more'. equals: #basic ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testCanConsumeLine [ "A list item does not force the creation of a new paragraph when the line is correctly indented. currently the implementation does not create a paragraph as a child of list item." @@ -77,7 +79,7 @@ a paragraph in a list item'. ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testCanConsumeLineBasic [ | root paragraph | @@ -95,7 +97,7 @@ MicParagraphBlockTest >> testCanConsumeLineBasic [ Another line'. ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testCanConsumeLineOtherBlocks [ | root paragraph | @@ -113,7 +115,7 @@ MicParagraphBlockTest >> testCanConsumeLineOtherBlocks [ self deny: (paragraph canConsumeLine: '1. '). ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testHandlingSequenceOfBasicLinesProducesAParagraph [ | root paragraph | @@ -127,7 +129,7 @@ And that other line'. self assert: root children size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testSingleParagraph [ | root | root := parser parse: 'This is @@ -140,7 +142,7 @@ a paragraph on two lines'. ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testSingleParagraphWithIndentedText [ | source root expected | source := 'This is @@ -153,7 +155,7 @@ and one with tabs'. self assert: root children first text equals: expected ] -{ #category : #tests } +{ #category : 'tests' } MicParagraphBlockTest >> testTwoSingleParagraphs [ | root | root := parser parse: 'This is diff --git a/src/Microdown-Tests/MicParserTest.class.st b/src/Microdown-Tests/MicParserTest.class.st index 2f210bed..4ddf27ab 100644 --- a/src/Microdown-Tests/MicParserTest.class.st +++ b/src/Microdown-Tests/MicParserTest.class.st @@ -1,23 +1,25 @@ Class { - #name : #MicParserTest, - #superclass : #TestCase, + #name : 'MicParserTest', + #superclass : 'TestCase', #instVars : [ 'parser' ], #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Tests-Parser' + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #running } +{ #category : 'running' } MicParserTest >> setUp [ super setUp. parser := MicrodownParser new. ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testEmpty [ | source root | source := ''. @@ -26,7 +28,7 @@ MicParserTest >> testEmpty [ ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testEmptyOnMultipleLines [ | source root | source := ' @@ -38,42 +40,42 @@ MicParserTest >> testEmptyOnMultipleLines [ ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testIsAListDash [ self assert: (parser isAList: '- one') ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testIsAListNumbered [ self assert: (parser isAList: '11. one') ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testIsAListPlus [ self assert: (parser isAList: '+ one') ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testIsAListStar [ self assert: (parser isAList: '* one') ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testIsAListStar2 [ self assert: (parser isAList: ' * one' trim) ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testOnceParsedCurrentShouldBeTheRootblock [ | source root | @@ -83,7 +85,7 @@ a paragraph on two lines'. self assert: parser current == root ] -{ #category : #tests } +{ #category : 'tests' } MicParserTest >> testParsingLogic [ | source root textBody argument line code | diff --git a/src/Microdown-Tests/MicPharoEvaluatortBlockTest.class.st b/src/Microdown-Tests/MicPharoEvaluatortBlockTest.class.st index 3b72bb03..31365989 100644 --- a/src/Microdown-Tests/MicPharoEvaluatortBlockTest.class.st +++ b/src/Microdown-Tests/MicPharoEvaluatortBlockTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #MicPharoEvaluatortBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Extensions' + #name : 'MicPharoEvaluatortBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } MicPharoEvaluatortBlockTest >> subjectClass [ ^ MicPharoEvaluatorBlock ] -{ #category : #tests } +{ #category : 'tests' } MicPharoEvaluatortBlockTest >> testScriptBloc [ | doc | diff --git a/src/Microdown-Tests/MicPharoImageResourceReferenceTest.class.st b/src/Microdown-Tests/MicPharoImageResourceReferenceTest.class.st index d33a0df0..0b343477 100644 --- a/src/Microdown-Tests/MicPharoImageResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicPharoImageResourceReferenceTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicPharoImageResourceReferenceTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Resolution' + #name : 'MicPharoImageResourceReferenceTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Resolution', + #package : 'Microdown-Tests', + #tag : 'Resolution' } -{ #category : #'test support' } +{ #category : 'test support' } MicPharoImageResourceReferenceTest class >> microdownProducingMethod [ ^ Microdown parse: 'I am **bold**' ] -{ #category : #tests } +{ #category : 'tests' } MicPharoImageResourceReferenceTest >> testIcon [ | uri image | @@ -19,7 +21,7 @@ MicPharoImageResourceReferenceTest >> testIcon [ self assert: image equals: (Object iconNamed: #info) ] -{ #category : #tests } +{ #category : 'tests' } MicPharoImageResourceReferenceTest >> testMicrodownImport [ | ref doc | @@ -30,7 +32,7 @@ MicPharoImageResourceReferenceTest >> testMicrodownImport [ self assert: doc children notEmpty ] -{ #category : #tests } +{ #category : 'tests' } MicPharoImageResourceReferenceTest >> testSingleSlash [ | uri | diff --git a/src/Microdown-Tests/MicPharoScriptBlockTest.class.st b/src/Microdown-Tests/MicPharoScriptBlockTest.class.st index 497ce154..24702703 100644 --- a/src/Microdown-Tests/MicPharoScriptBlockTest.class.st +++ b/src/Microdown-Tests/MicPharoScriptBlockTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #MicPharoScriptBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Extensions' + #name : 'MicPharoScriptBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } MicPharoScriptBlockTest >> subjectClass [ ^ MicPharoScriptBlock ] -{ #category : #tests } +{ #category : 'tests' } MicPharoScriptBlockTest >> testScriptBloc [ | doc | diff --git a/src/Microdown-Tests/MicPropertyError.class.st b/src/Microdown-Tests/MicPropertyError.class.st index 9e43edb4..27d3b353 100644 --- a/src/Microdown-Tests/MicPropertyError.class.st +++ b/src/Microdown-Tests/MicPropertyError.class.st @@ -1,5 +1,7 @@ Class { - #name : #MicPropertyError, - #superclass : #Error, - #category : #'Microdown-Tests-Parser' + #name : 'MicPropertyError', + #superclass : 'Error', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } diff --git a/src/Microdown-Tests/MicQuoteBlockTest.class.st b/src/Microdown-Tests/MicQuoteBlockTest.class.st index 8f29180a..2206d66d 100644 --- a/src/Microdown-Tests/MicQuoteBlockTest.class.st +++ b/src/Microdown-Tests/MicQuoteBlockTest.class.st @@ -2,17 +2,19 @@ I'm a test class for testing the behavior of MicBlockTextBlock " Class { - #name : #MicQuoteBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicQuoteBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicQuoteBlockTest >> subjectClass [ ^ MicQuoteBlock ] -{ #category : #tests } +{ #category : 'tests' } MicQuoteBlockTest >> testBasicQuoteBlock [ | source root | source := '> test1 @@ -26,7 +28,7 @@ test 2'. "note that this is wrong because the body of a quoteblock is a paragraph and can containsTruePositive: formatting else this is just a code block" ] -{ #category : #tests } +{ #category : 'tests' } MicQuoteBlockTest >> testNotLazy [ "the spec says that the last > could be omitted but we do not support it." | source root text | @@ -43,7 +45,7 @@ text3'. - text2' ] -{ #category : #tests } +{ #category : 'tests' } MicQuoteBlockTest >> testQuoteBlockDoesNotInterpretOtherBlockMarkup [ | source root text | source := '> text1 @@ -62,7 +64,7 @@ MicQuoteBlockTest >> testQuoteBlockDoesNotInterpretOtherBlockMarkup [ Yeah cool' ] -{ #category : #tests } +{ #category : 'tests' } MicQuoteBlockTest >> testSingleQuoteBlock [ | source root text | source := '> text1 @@ -77,7 +79,7 @@ MicQuoteBlockTest >> testSingleQuoteBlock [ text2' ] -{ #category : #tests } +{ #category : 'tests' } MicQuoteBlockTest >> testSingleQuoteBlockFollowedByList [ | source root text list | source := '> text1 diff --git a/src/Microdown-Tests/MicRawBlockTest.class.st b/src/Microdown-Tests/MicRawBlockTest.class.st index 38bf7151..4692d388 100644 --- a/src/Microdown-Tests/MicRawBlockTest.class.st +++ b/src/Microdown-Tests/MicRawBlockTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicRawBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicRawBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicRawBlockTest >> subjectClass [ ^ MicRawBlock ] -{ #category : #tests } +{ #category : 'tests' } MicRawBlockTest >> testRaw [ | root | diff --git a/src/Microdown-Tests/MicRelativeResourceReferenceTest.class.st b/src/Microdown-Tests/MicRelativeResourceReferenceTest.class.st index 188c343b..63525838 100644 --- a/src/Microdown-Tests/MicRelativeResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicRelativeResourceReferenceTest.class.st @@ -2,12 +2,14 @@ A MicRelativeResourceReferenceTest is a test class for testing the behavior of MicRelativeResourceReference " Class { - #name : #MicRelativeResourceReferenceTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Resolution' + #name : 'MicRelativeResourceReferenceTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Resolution', + #package : 'Microdown-Tests', + #tag : 'Resolution' } -{ #category : #tests } +{ #category : 'tests' } MicRelativeResourceReferenceTest >> testIsRelative [ | mic ref | mic := Microdown parse: '[look here](../images/rudolf.png)'. @@ -15,7 +17,7 @@ MicRelativeResourceReferenceTest >> testIsRelative [ self assert: ref reference isRelative ] -{ #category : #tests } +{ #category : 'tests' } MicRelativeResourceReferenceTest >> testPath [ self assert: 'figures/foo.png' asMicResourceReference path equals: 'figures/foo.png'. @@ -25,7 +27,7 @@ MicRelativeResourceReferenceTest >> testPath [ self assert: '../figures/foo.png' asMicResourceReference path equals: '../figures/foo.png' ] -{ #category : #tests } +{ #category : 'tests' } MicRelativeResourceReferenceTest >> testPrintOn [ | mic ref print | mic := Microdown parse: '[look here](../images/rudolf.png)'. @@ -34,7 +36,7 @@ MicRelativeResourceReferenceTest >> testPrintOn [ self assert: print equals: 'a MicRelativeResourceReference(../images/rudolf.png)' ] -{ #category : #tests } +{ #category : 'tests' } MicRelativeResourceReferenceTest >> testRelativePath [ | mic ref| mic := Microdown parse: '[look here](../images/rudolf.png)'. diff --git a/src/Microdown-Tests/MicResourceReferenceTest.class.st b/src/Microdown-Tests/MicResourceReferenceTest.class.st index 978697fe..b5dabf34 100644 --- a/src/Microdown-Tests/MicResourceReferenceTest.class.st +++ b/src/Microdown-Tests/MicResourceReferenceTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #MicResourceReferenceTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Resolution' + #name : 'MicResourceReferenceTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Resolution', + #package : 'Microdown-Tests', + #tag : 'Resolution' } -{ #category : #helper } +{ #category : 'helper' } MicResourceReferenceTest >> resourceClass [ ^ MicResourceReference ] -{ #category : #tests } +{ #category : 'tests' } MicResourceReferenceTest >> testHttpRecognized [ |uri ref| uri := 'https://raw.githubusercontent.com/pillar-markup/Microdown/dev/doc/testMicrodown/readme.md'. @@ -19,7 +21,7 @@ MicResourceReferenceTest >> testHttpRecognized [ self assert: ref class equals: MicHTTPResourceReference. ] -{ #category : #tests } +{ #category : 'tests' } MicResourceReferenceTest >> testIsDirectory [ | ref | @@ -27,7 +29,7 @@ MicResourceReferenceTest >> testIsDirectory [ self deny: ref isDirectory ] -{ #category : #tests } +{ #category : 'tests' } MicResourceReferenceTest >> testParseFullUrl [ | mf | @@ -36,7 +38,7 @@ MicResourceReferenceTest >> testParseFullUrl [ ] -{ #category : #'tests - file reference conversion' } +{ #category : 'tests - file reference conversion' } MicResourceReferenceTest >> testPurePathInterpretedAsFile [ | mf | mf := self resourceClass fromUri: '/chapter1/figures/m.md'. @@ -45,7 +47,7 @@ MicResourceReferenceTest >> testPurePathInterpretedAsFile [ ] -{ #category : #tests } +{ #category : 'tests' } MicResourceReferenceTest >> testPurePathIsRelativeFile [ | mf | @@ -55,7 +57,7 @@ MicResourceReferenceTest >> testPurePathIsRelativeFile [ ] -{ #category : #tests } +{ #category : 'tests' } MicResourceReferenceTest >> testRelativeFileRecognized [ | mf | @@ -65,7 +67,7 @@ MicResourceReferenceTest >> testRelativeFileRecognized [ ] -{ #category : #tests } +{ #category : 'tests' } MicResourceReferenceTest >> testStringExtensionMethod [ | ref | ref := 'http://somewhere.org/path/to/image.png' asMicResourceReference. diff --git a/src/Microdown-Tests/MicResourceSettingsTest.class.st b/src/Microdown-Tests/MicResourceSettingsTest.class.st index 371b8c0f..e976b97d 100644 --- a/src/Microdown-Tests/MicResourceSettingsTest.class.st +++ b/src/Microdown-Tests/MicResourceSettingsTest.class.st @@ -2,17 +2,19 @@ My tests leave the Microdown settings intact " Class { - #name : #MicResourceSettingsTest, - #superclass : #TestCase, + #name : 'MicResourceSettingsTest', + #superclass : 'TestCase', #instVars : [ 'subject', 'offlineSetting', 'isCachingRessourcesSetting' ], - #category : #'Microdown-Tests-Resolution' + #category : 'Microdown-Tests-Resolution', + #package : 'Microdown-Tests', + #tag : 'Resolution' } -{ #category : #utilities } +{ #category : 'utilities' } MicResourceSettingsTest >> cacheAt: aUrl [ | cache | cache := MicHTTPResourceReference resourcesCache. @@ -22,12 +24,12 @@ MicResourceSettingsTest >> cacheAt: aUrl [ ifFalse: [ nil ] ] -{ #category : #utilities } +{ #category : 'utilities' } MicResourceSettingsTest >> imageUrl [ ^ 'https://raw.githubusercontent.com/pillar-markup/Microdown/dev/doc/testMicrodown/toplevel.png' ] -{ #category : #running } +{ #category : 'running' } MicResourceSettingsTest >> setUp [ super setUp. @@ -36,7 +38,7 @@ MicResourceSettingsTest >> setUp [ isCachingRessourcesSetting := subject isCachingResources. ] -{ #category : #running } +{ #category : 'running' } MicResourceSettingsTest >> tearDown [ subject offline: offlineSetting. subject isCachingResources: isCachingRessourcesSetting. @@ -44,7 +46,7 @@ MicResourceSettingsTest >> tearDown [ super tearDown. ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testIsCashingResourcesFalse [ "Check that resources are cached when they should not be" | sample | @@ -55,7 +57,7 @@ MicResourceSettingsTest >> testIsCashingResourcesFalse [ self assert: (self cacheAt: self imageUrl asZnUrl ) isNil. ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testIsCashingResourcesTrue [ "Check that resources are cached when they should be" | sample | @@ -68,7 +70,7 @@ MicResourceSettingsTest >> testIsCashingResourcesTrue [ ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testIsOfflineAndResourceFound [ "Check that resources are found in the cache when offline" | sample | @@ -86,7 +88,7 @@ MicResourceSettingsTest >> testIsOfflineAndResourceFound [ self assert: (sample beginsWith: 'FooBarRules') not ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testIsOfflineFalse [ "Check that resources are not cached when they should not be" | sample | @@ -97,7 +99,7 @@ MicResourceSettingsTest >> testIsOfflineFalse [ self assert: (self cacheAt: self imageUrl asZnUrl ) isNil. ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testIsOfflineTrueAndResourceFound [ "Check that resources are found in the cache when offline" | sample | @@ -115,7 +117,7 @@ MicResourceSettingsTest >> testIsOfflineTrueAndResourceFound [ self assert: (sample beginsWith: 'FooBarRules') not ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testIsOfflineTrueAndResourceNotFound [ "Check that resources are found in the cache when offline" | sample | @@ -126,7 +128,7 @@ MicResourceSettingsTest >> testIsOfflineTrueAndResourceNotFound [ self assert: (sample asString beginsWith: 'FooBarRules') ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testIsOfflineTrueNotFound [ "Check that resources are cached when they should not be" | sample | @@ -137,7 +139,7 @@ MicResourceSettingsTest >> testIsOfflineTrueNotFound [ self assert: (self cacheAt: self imageUrl asZnUrl ) isNil ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testOnlyOneMethodInMicrodownDefinesSettings [ | all | all :=(Pragma allNamed: #systemsettings) @@ -146,7 +148,7 @@ MicResourceSettingsTest >> testOnlyOneMethodInMicrodownDefinesSettings [ self assert: all size equals: 1 ] -{ #category : #tests } +{ #category : 'tests' } MicResourceSettingsTest >> testThereAreTwoSettings [ "I am an approximation, just making sure the two class variables exist" self assert: subject classVarNames equals: #(IsCachingResources Offline) diff --git a/src/Microdown-Tests/MicRootBlockTest.class.st b/src/Microdown-Tests/MicRootBlockTest.class.st index f5ad5123..f48a8c7c 100644 --- a/src/Microdown-Tests/MicRootBlockTest.class.st +++ b/src/Microdown-Tests/MicRootBlockTest.class.st @@ -2,17 +2,19 @@ I'm a test class for testing the behavior of MicRootBlock " Class { - #name : #MicRootBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicRootBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicRootBlockTest >> subjectClass [ ^ MicRootBlock ] -{ #category : #tests } +{ #category : 'tests' } MicRootBlockTest >> testRootCanConsumeLine [ "a root block can consume anything" diff --git a/src/Microdown-Tests/MicScriptBlockExtensionForTest.class.st b/src/Microdown-Tests/MicScriptBlockExtensionForTest.class.st index b426427e..9d8d19be 100644 --- a/src/Microdown-Tests/MicScriptBlockExtensionForTest.class.st +++ b/src/Microdown-Tests/MicScriptBlockExtensionForTest.class.st @@ -2,12 +2,14 @@ I am used in the MathBlockExtensionTest " Class { - #name : #MicScriptBlockExtensionForTest, - #superclass : #MicScriptBlock, - #category : #'Microdown-Tests-Extensions' + #name : 'MicScriptBlockExtensionForTest', + #superclass : 'MicScriptBlock', + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #accessing } +{ #category : 'accessing' } MicScriptBlockExtensionForTest class >> tag [ ^#scriptBlockExtentionTest ] diff --git a/src/Microdown-Tests/MicScriptBlockExtensionTest.class.st b/src/Microdown-Tests/MicScriptBlockExtensionTest.class.st index 2a107a15..ee95544a 100644 --- a/src/Microdown-Tests/MicScriptBlockExtensionTest.class.st +++ b/src/Microdown-Tests/MicScriptBlockExtensionTest.class.st @@ -1,13 +1,15 @@ Class { - #name : #MicScriptBlockExtensionTest, - #superclass : #TestCase, + #name : 'MicScriptBlockExtensionTest', + #superclass : 'TestCase', #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Tests-Extensions' + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } MicScriptBlockExtensionTest >> testExtension [ "test that codeblock syntax be extended. The helper class MicScriptBlockExtensionForTest has extension tag scriptBlockExtentionTest" @@ -23,7 +25,7 @@ stuff which is left for the extension to handle self assert: extension body equals: 'stuff which is left for the extension to handle' ] -{ #category : #tests } +{ #category : 'tests' } MicScriptBlockExtensionTest >> testExtensionWithArguments [ "test that script interpret the arguments correctly" @@ -39,13 +41,13 @@ stuff which is left for the extension to handle assert: (extension arguments at: 'foe') equals: '42' ] -{ #category : #tests } +{ #category : 'tests' } MicScriptBlockExtensionTest >> testExtensionsAreNotDoneToCodeBlock [ "One should not make subclasses of codeblock, but script block" self assert: MicCodeBlock allSubclasses isEmpty ] -{ #category : #tests } +{ #category : 'tests' } MicScriptBlockExtensionTest >> testUndefinedExtensionIsCodeblock [ "test that unknown script extensions result in codeblock" diff --git a/src/Microdown-Tests/MicSlideBlockTest.class.st b/src/Microdown-Tests/MicSlideBlockTest.class.st index 953093e7..2f4bf43e 100644 --- a/src/Microdown-Tests/MicSlideBlockTest.class.st +++ b/src/Microdown-Tests/MicSlideBlockTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicSlideBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Extensions' + #name : 'MicSlideBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Extensions', + #package : 'Microdown-Tests', + #tag : 'Extensions' } -{ #category : #tests } +{ #category : 'tests' } MicSlideBlockTest >> subjectClass [ ^ MicSlideBlock ] -{ #category : #tests } +{ #category : 'tests' } MicSlideBlockTest >> testSlideBloc [ | doc | @@ -24,7 +26,7 @@ MicSlideBlockTest >> testSlideBloc [ self assert: doc children first title equals: 'This is a cool title' ] -{ #category : #tests } +{ #category : 'tests' } MicSlideBlockTest >> testSlideBlocIsParsed [ | doc | diff --git a/src/Microdown-Tests/MicStringExtensionTest.class.st b/src/Microdown-Tests/MicStringExtensionTest.class.st index 3890794e..ffc05ccc 100644 --- a/src/Microdown-Tests/MicStringExtensionTest.class.st +++ b/src/Microdown-Tests/MicStringExtensionTest.class.st @@ -2,12 +2,14 @@ I test the string extensions made by Microdown " Class { - #name : #MicStringExtensionTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Parser' + #name : 'MicStringExtensionTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicStringExtensionTest >> testStripNTabs [ | one five | one := String tab. @@ -25,7 +27,7 @@ MicStringExtensionTest >> testStripNTabs [ assert: (five,'a' stripNtabs: 8) equals: 'a' ] -{ #category : #tests } +{ #category : 'tests' } MicStringExtensionTest >> testWithoutPreTabs [ | one five | one := String tab. diff --git a/src/Microdown-Tests/MicUnknownResourceUriTest.class.st b/src/Microdown-Tests/MicUnknownResourceUriTest.class.st index f84e26be..c74f6bf8 100644 --- a/src/Microdown-Tests/MicUnknownResourceUriTest.class.st +++ b/src/Microdown-Tests/MicUnknownResourceUriTest.class.st @@ -2,12 +2,14 @@ A MicUnknownResourceUriTest is a test class for testing the behavior of MicUnknownResourceUri " Class { - #name : #MicUnknownResourceUriTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Resolution' + #name : 'MicUnknownResourceUriTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Resolution', + #package : 'Microdown-Tests', + #tag : 'Resolution' } -{ #category : #tests } +{ #category : 'tests' } MicUnknownResourceUriTest >> testBinaryStream [ | ref errorUri | errorUri := 'sqaf://foo/bar'. @@ -16,7 +18,7 @@ MicUnknownResourceUriTest >> testBinaryStream [ self assert: ref loadImage class equals: Form ] -{ #category : #tests } +{ #category : 'tests' } MicUnknownResourceUriTest >> testContents [ | ref errorUri | errorUri := 'sqaf://foo/bar'. @@ -24,7 +26,7 @@ MicUnknownResourceUriTest >> testContents [ self assert: (ref contents includesSubstring: errorUri) ] -{ #category : #tests } +{ #category : 'tests' } MicUnknownResourceUriTest >> testIsCatchAll [ | ref | ref := MicResourceReference fromUri: 'sqaf://foo/bar'. diff --git a/src/Microdown-Tests/MicUnorderedListBlockTest.class.st b/src/Microdown-Tests/MicUnorderedListBlockTest.class.st index 14f866cc..05d19d83 100644 --- a/src/Microdown-Tests/MicUnorderedListBlockTest.class.st +++ b/src/Microdown-Tests/MicUnorderedListBlockTest.class.st @@ -2,17 +2,19 @@ I'm a test class for testing the behavior of MicUnorderedListBlock " Class { - #name : #MicUnorderedListBlockTest, - #superclass : #MicBlockTest, - #category : #'Microdown-Tests-Parser' + #name : 'MicUnorderedListBlockTest', + #superclass : 'MicBlockTest', + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> subjectClass [ ^ MicUnorderedListBlock ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testEmbeddedOrdered [ | source root list | source := @@ -30,7 +32,7 @@ MicUnorderedListBlockTest >> testEmbeddedOrdered [ text equals: 'sublevel item 2' ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testEmbeddedOrderedWithFormatting [ | source root list item4 | source := @@ -54,7 +56,7 @@ MicUnorderedListBlockTest >> testEmbeddedOrderedWithFormatting [ self assert: item4 textElements third substring equals: 'item 24'. ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testMixing2 [ | source root list1 list2 | source := @@ -80,7 +82,7 @@ MicUnorderedListBlockTest >> testMixing2 [ self assert: list2 children second text equals: 'item 2'. ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testMixingOrderedInsideUnorderedWithParagraph [ | source root list1 | source := @@ -105,7 +107,7 @@ multiple lines 3. sub item 2'. ] -{ #category : #'tests - nested' } +{ #category : 'tests - nested' } MicUnorderedListBlockTest >> testNestedLevel [ | source root list item1| source := @@ -133,7 +135,7 @@ MicUnorderedListBlockTest >> testNestedLevel [ ] -{ #category : #'tests - nested' } +{ #category : 'tests - nested' } MicUnorderedListBlockTest >> testNestedLevel2 [ | source root list item1 sublevelItem| source := @@ -161,7 +163,7 @@ MicUnorderedListBlockTest >> testNestedLevel2 [ self assert: sublevelItem children second children first text equals: 'subsublevel'. ] -{ #category : #'tests - list' } +{ #category : 'tests - list' } MicUnorderedListBlockTest >> testOrderedListAPIToAccessText [ | list | @@ -171,7 +173,7 @@ MicUnorderedListBlockTest >> testOrderedListAPIToAccessText [ self assert: list text equals: '2.b' ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelList [ | source root list | source := @@ -183,7 +185,7 @@ MicUnorderedListBlockTest >> testSingleLevelList [ self assert: list children second text equals: 'item 2' ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelList2 [ | source root list | source := @@ -199,7 +201,7 @@ MicUnorderedListBlockTest >> testSingleLevelList2 [ expanded' ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelList2WithFormatting [ | source root list | source := @@ -217,7 +219,7 @@ expanded'. self assert: list children first textElements third substring equals: 'expanded'. ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelListAllBulletTypes [ | source root list | source := @@ -229,7 +231,7 @@ MicUnorderedListBlockTest >> testSingleLevelListAllBulletTypes [ self assert: list children size equals: 2.] ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelListSplitWithEmptyLine [ | source root list | source := @@ -249,7 +251,7 @@ MicUnorderedListBlockTest >> testSingleLevelListSplitWithEmptyLine [ ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelListSplitWithMultipleEmptyLines [ | source root list | source := @@ -272,7 +274,7 @@ MicUnorderedListBlockTest >> testSingleLevelListSplitWithMultipleEmptyLines [ ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelListStartingWithoutSpaceSplitParagraph [ | source root list | source := @@ -293,7 +295,7 @@ expanded'. ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelListStartingWithoutSpaceSplitParagraph2 [ | source root list | source := @@ -315,7 +317,7 @@ same indentation no new paragraph'. ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelListWithItemSpawning [ | root list | root := parser @@ -332,7 +334,7 @@ follow up of second item'. ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelListWithStar [ | source root list | source := @@ -344,7 +346,7 @@ MicUnorderedListBlockTest >> testSingleLevelListWithStar [ self assert: list children second text equals: 'item 2' ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testSingleLevelMixedList [ | source root list | source := @@ -357,7 +359,7 @@ MicUnorderedListBlockTest >> testSingleLevelMixedList [ self assert: list children second text equals: 'item 2' ] -{ #category : #tests } +{ #category : 'tests' } MicUnorderedListBlockTest >> testTwoLevelList [ | source root list | source := diff --git a/src/Microdown-Tests/MicZincPathResolverTest.class.st b/src/Microdown-Tests/MicZincPathResolverTest.class.st index afe14a10..e4ea15ab 100644 --- a/src/Microdown-Tests/MicZincPathResolverTest.class.st +++ b/src/Microdown-Tests/MicZincPathResolverTest.class.st @@ -2,12 +2,14 @@ A MicZincPathResolverTest is a test class for testing the behavior of MicZincPathResolver " Class { - #name : #MicZincPathResolverTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Resolution' + #name : 'MicZincPathResolverTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Resolution', + #package : 'Microdown-Tests', + #tag : 'Resolution' } -{ #category : #tests } +{ #category : 'tests' } MicZincPathResolverTest >> testVisitFileImage [ | doc imageNode absoluteFile | doc := Microdown parse: '![alttext](images/pharo.png)'. @@ -24,7 +26,7 @@ MicZincPathResolverTest >> testVisitFileImage [ self assert: imageNode reference filesystem equals: #Bogus ] -{ #category : #tests } +{ #category : 'tests' } MicZincPathResolverTest >> testVisitHttpImage [ | doc imageNode | doc := Microdown parse: '![alttext](images/pharo.png)'. @@ -37,7 +39,7 @@ MicZincPathResolverTest >> testVisitHttpImage [ self assert: imageNode reference uriString equals: 'http://nowhere/my/deep/directory/images/pharo.png'. ] -{ #category : #tests } +{ #category : 'tests' } MicZincPathResolverTest >> testVisitHttpInput [ | doc inputNode | doc := Microdown parse: ''. @@ -50,7 +52,7 @@ MicZincPathResolverTest >> testVisitHttpInput [ self assert: inputNode reference uriString equals: 'http://nowhere/my/deep/directory/otherFile.md'. ] -{ #category : #tests } +{ #category : 'tests' } MicZincPathResolverTest >> testVisitHttpInput_WithReference [ | doc inputNode | doc := Microdown parse: ''. @@ -63,7 +65,7 @@ MicZincPathResolverTest >> testVisitHttpInput_WithReference [ self assert: inputNode reference uriString equals: 'http://nowhere/my/deep/directory/otherFile.md'. ] -{ #category : #tests } +{ #category : 'tests' } MicZincPathResolverTest >> testVisitHttpLink [ | doc linkNode | doc := Microdown parse: '[follow me](otherFile.md)'. diff --git a/src/Microdown-Tests/MicrodownInlineParserTest.class.st b/src/Microdown-Tests/MicrodownInlineParserTest.class.st index 732da24b..abc09603 100644 --- a/src/Microdown-Tests/MicrodownInlineParserTest.class.st +++ b/src/Microdown-Tests/MicrodownInlineParserTest.class.st @@ -2,22 +2,24 @@ The logic is to call the main parser so that the inline elements are in the blocks as after the closeMe phase of a Block (this is where the inline block are parsed). " Class { - #name : #MicrodownInlineParserTest, - #superclass : #TestCase, + #name : 'MicrodownInlineParserTest', + #superclass : 'TestCase', #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Tests-Parser' + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #parsing } +{ #category : 'parsing' } MicrodownInlineParserTest >> parse: aString [ "self new parse: 'foo_abbb_zz' " ^ self parserClass parse: aString ] -{ #category : #parsing } +{ #category : 'parsing' } MicrodownInlineParserTest >> parseAndReturnElementsOfParagraphFor: aString [ "self new parse: 'foo_abbb_zz' " @@ -25,17 +27,17 @@ MicrodownInlineParserTest >> parseAndReturnElementsOfParagraphFor: aString [ ] -{ #category : #parsing } +{ #category : 'parsing' } MicrodownInlineParserTest >> parser [ ^ self parserClass new ] -{ #category : #parsing } +{ #category : 'parsing' } MicrodownInlineParserTest >> parserClass [ ^ Microdown ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> rawTestingFor: aString [ | elements | @@ -48,7 +50,7 @@ MicrodownInlineParserTest >> rawTestingFor: aString [ self assert: elements second closingDelimiter equals: '}}' ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testAPIToAccessChildrenOfNestedElements [ | elements bold | @@ -68,7 +70,7 @@ MicrodownInlineParserTest >> testAPIToAccessChildrenOfNestedElements [ self assert: bold children second class equals: MicTextBlock. ] -{ #category : #'tests - anchors' } +{ #category : 'tests - anchors' } MicrodownInlineParserTest >> testAnchorReferenceWithoutClosure [ | elements | elements := (self parseAndReturnElementsOfParagraphFor: 'abc*@anchorsdef'). @@ -76,7 +78,7 @@ MicrodownInlineParserTest >> testAnchorReferenceWithoutClosure [ self assert: elements first substring equals: 'abc*@anchorsdef' ] -{ #category : #'tests - anchors' } +{ #category : 'tests - anchors' } MicrodownInlineParserTest >> testAnchorRefernce [ | elements | elements := (self parseAndReturnElementsOfParagraphFor: 'abc*@anchors@*def'). @@ -88,7 +90,7 @@ MicrodownInlineParserTest >> testAnchorRefernce [ self assert: elements second closingDelimiter equals: '@*' ] -{ #category : #'tests - annotations' } +{ #category : 'tests - annotations' } MicrodownInlineParserTest >> testAnnotationBasic [ | elements annotation | elements := self parseAndReturnElementsOfParagraphFor: 'needed ', AnnotationOpenerMarkup ,'footnote | value=A foonote is annotation.', AnnotationCloserMarkup. @@ -103,7 +105,7 @@ MicrodownInlineParserTest >> testAnnotationBasic [ ] -{ #category : #'tests - annotations' } +{ #category : 'tests - annotations' } MicrodownInlineParserTest >> testAnnotationPrintString [ | elements | @@ -113,7 +115,7 @@ MicrodownInlineParserTest >> testAnnotationPrintString [ self assert: elements second name equals: 'footnote' ] -{ #category : #'tests - annotations' } +{ #category : 'tests - annotations' } MicrodownInlineParserTest >> testAnnotations [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc', AnnotationOpenerMarkup,'footnote | value=A foonote is annotation.', AnnotationCloserMarkup,'def'. @@ -126,7 +128,7 @@ MicrodownInlineParserTest >> testAnnotations [ ] -{ #category : #'tests - annotations' } +{ #category : 'tests - annotations' } MicrodownInlineParserTest >> testAnnotationsWithoutClosure [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc> testAnnotationsWithoutClosure [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testBold [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc**bolds**def'. @@ -152,7 +154,7 @@ MicrodownInlineParserTest >> testBold [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testBoldsAndCorrectNestedItalics [ | elements bold italic | @@ -173,7 +175,7 @@ MicrodownInlineParserTest >> testBoldsAndCorrectNestedItalics [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testBoldsAndNestedItalics [ | elements | elements := (self parseAndReturnElementsOfParagraphFor: 'abc**_bolds_**def'). @@ -185,7 +187,7 @@ MicrodownInlineParserTest >> testBoldsAndNestedItalics [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testBoldsAndNestedItalicsWithClosureAfterOpenItalics [ | elements | @@ -199,7 +201,7 @@ MicrodownInlineParserTest >> testBoldsAndNestedItalicsWithClosureAfterOpenItalic ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testBoldsWithoutClosure [ | elements | @@ -209,7 +211,7 @@ MicrodownInlineParserTest >> testBoldsWithoutClosure [ ] -{ #category : #'tests - others' } +{ #category : 'tests - others' } MicrodownInlineParserTest >> testEscape [ | elements | @@ -220,7 +222,7 @@ MicrodownInlineParserTest >> testEscape [ ] -{ #category : #tests } +{ #category : 'tests' } MicrodownInlineParserTest >> testEscapeAsLastCharacterDoesNotBreak [ | elts | @@ -240,7 +242,7 @@ MicrodownInlineParserTest >> testEscapeAsLastCharacterDoesNotBreak [ self assert: elts first substring equals: 'cha'. ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicrodownInlineParserTest >> testFigure [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc![caption](http://www.pharo.org?parameters=value)def'. @@ -252,7 +254,7 @@ MicrodownInlineParserTest >> testFigure [ self assert: elements second closingDelimiter equals: ')' ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicrodownInlineParserTest >> testFigureWithParameters [ | elements figure | @@ -265,7 +267,7 @@ MicrodownInlineParserTest >> testFigureWithParameters [ self assert: figure arguments keys size equals: 2 ] -{ #category : #'tests - figure' } +{ #category : 'tests - figure' } MicrodownInlineParserTest >> testFigureWithParameters_withoutQuotes [ | elements figure | @@ -278,7 +280,7 @@ MicrodownInlineParserTest >> testFigureWithParameters_withoutQuotes [ self assert: figure arguments keys size equals: 2 ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testItalic [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc_italics_def'. @@ -289,7 +291,7 @@ MicrodownInlineParserTest >> testItalic [ self assert: elements second openingDelimiter equals: '_' ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testItalicsAndNestedBolds [ | elements | elements := (self parseAndReturnElementsOfParagraphFor: 'abc_**italics**_def'). @@ -300,7 +302,7 @@ MicrodownInlineParserTest >> testItalicsAndNestedBolds [ self assert: elements second openingDelimiter equals: '_' ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testItalicsAndNestedBoldsWithClosureAfterOpenBolds [ | elements | @@ -314,7 +316,7 @@ MicrodownInlineParserTest >> testItalicsAndNestedBoldsWithClosureAfterOpenBolds ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testItalicsWithoutClosure [ | elements | @@ -323,7 +325,7 @@ MicrodownInlineParserTest >> testItalicsWithoutClosure [ self assert: elements first substring equals: 'abc_italicsdef' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicrodownInlineParserTest >> testLink [ | elements | elements := (self parseAndReturnElementsOfParagraphFor: 'abc[Pharo.Org](http://www.pharo.org)def'). @@ -339,7 +341,7 @@ MicrodownInlineParserTest >> testLink [ self assert: elements second closingDelimiter equals: ')' ] -{ #category : #'tests - link' } +{ #category : 'tests - link' } MicrodownInlineParserTest >> testLinkWithParameters [ | elements | elements := (self parseAndReturnElementsOfParagraphFor: 'abc[GH Ducasse](https://github.com/Ducasse?tab=repositories)def'). @@ -354,7 +356,7 @@ MicrodownInlineParserTest >> testLinkWithParameters [ self assert: elements second closingDelimiter equals: ')' ] -{ #category : #'tests - others' } +{ #category : 'tests - others' } MicrodownInlineParserTest >> testMath [ | elements | elements := (self parseAndReturnElementsOfParagraphFor: 'abc$V_i = C_0 - C_3$def'). @@ -365,7 +367,7 @@ MicrodownInlineParserTest >> testMath [ self assert: elements second openingDelimiter equals: '$' ] -{ #category : #'tests - others' } +{ #category : 'tests - others' } MicrodownInlineParserTest >> testMathBackslash [ | elements | elements := (self parseAndReturnElementsOfParagraphFor: '$ f(a) = \frac{1}{2\pi i} \oint_{\gamma} \frac{f(z)}{z - a} dz $'). @@ -373,7 +375,7 @@ MicrodownInlineParserTest >> testMathBackslash [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testMonospace [ | elements | @@ -386,7 +388,7 @@ MicrodownInlineParserTest >> testMonospace [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testMonospacesWithBackQuote [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc`foo\`bar`def'. @@ -395,7 +397,7 @@ MicrodownInlineParserTest >> testMonospacesWithBackQuote [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testMonospacesWithBackSlash [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc`foo\bar`def'. @@ -404,7 +406,7 @@ MicrodownInlineParserTest >> testMonospacesWithBackSlash [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testMonospacesWithDoubleBackSlash [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc`foo\\bar`def'. @@ -413,7 +415,7 @@ MicrodownInlineParserTest >> testMonospacesWithDoubleBackSlash [ ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testMonospacesWithTwoBackslashes [ | elements | elements := self parseAndReturnElementsOfParagraphFor: '`\a+\b`'. @@ -421,7 +423,7 @@ MicrodownInlineParserTest >> testMonospacesWithTwoBackslashes [ self assert: elements first substring equals: '\a+\b' ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testMonospacesWithoutClosure [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc`monospacesdef'. @@ -430,7 +432,7 @@ MicrodownInlineParserTest >> testMonospacesWithoutClosure [ ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> testRawWitoutClosure [ | elements | @@ -439,12 +441,12 @@ MicrodownInlineParserTest >> testRawWitoutClosure [ self assert: elements first substring equals: 'abc{{rawsdef' ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> testRaws [ self rawTestingFor: 'anything' ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> testRawsDoesNotHandleWellCurly [ | elements | elements := self parseAndReturnElementsOfParagraphFor: 'abc{{', 'anything}', '}}def'. @@ -458,43 +460,43 @@ MicrodownInlineParserTest >> testRawsDoesNotHandleWellCurly [ ] -{ #category : #'tests - escape' } +{ #category : 'tests - escape' } MicrodownInlineParserTest >> testRawsDoesNotHandleWellEscape [ "Well, actually it does" self rawTestingFor: 'anything\*foo'. ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> testRawsHandleWellCurlyIfNotLast [ self rawTestingFor: 'anything}88'. ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> testRawsWithBold [ self rawTestingFor: '**bold**' ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> testRawsWithItalic [ self rawTestingFor: '_italic_' ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> testRawsWithMonospace [ self rawTestingFor: '`monononono`' ] -{ #category : #'tests - raw' } +{ #category : 'tests - raw' } MicrodownInlineParserTest >> testRawsWithStrike [ self rawTestingFor: '~strikkkkk~' ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testStrike [ | elements | @@ -506,7 +508,7 @@ MicrodownInlineParserTest >> testStrike [ self assert: elements second openingDelimiter equals: '~' ] -{ #category : #'tests - format' } +{ #category : 'tests - format' } MicrodownInlineParserTest >> testStrikesWithoutClosure [ | elements | @@ -516,7 +518,7 @@ MicrodownInlineParserTest >> testStrikesWithoutClosure [ ] -{ #category : #'tests - structure' } +{ #category : 'tests - structure' } MicrodownInlineParserTest >> testStructureOfAnchorReference [ | element | @@ -526,7 +528,7 @@ MicrodownInlineParserTest >> testStructureOfAnchorReference [ ] -{ #category : #'tests - structure' } +{ #category : 'tests - structure' } MicrodownInlineParserTest >> testStructureOfAnnotation [ | element | @@ -537,7 +539,7 @@ MicrodownInlineParserTest >> testStructureOfAnnotation [ ] -{ #category : #'tests - structure' } +{ #category : 'tests - structure' } MicrodownInlineParserTest >> testStructureOfBoldNestedText [ | element | @@ -553,7 +555,7 @@ MicrodownInlineParserTest >> testStructureOfBoldNestedText [ ] -{ #category : #'tests - structure' } +{ #category : 'tests - structure' } MicrodownInlineParserTest >> testStructureOfBoldSimpleText [ | element | @@ -565,7 +567,7 @@ MicrodownInlineParserTest >> testStructureOfBoldSimpleText [ ] -{ #category : #'tests - structure' } +{ #category : 'tests - structure' } MicrodownInlineParserTest >> testStructureOfPlainText [ | element | diff --git a/src/Microdown-Tests/MicrodownParserTest.class.st b/src/Microdown-Tests/MicrodownParserTest.class.st index d36d4c7d..27555113 100644 --- a/src/Microdown-Tests/MicrodownParserTest.class.st +++ b/src/Microdown-Tests/MicrodownParserTest.class.st @@ -1,22 +1,24 @@ Class { - #name : #MicrodownParserTest, - #superclass : #TestCase, + #name : 'MicrodownParserTest', + #superclass : 'TestCase', #instVars : [ 'parser' ], #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Tests-Parser' + #category : 'Microdown-Tests-Parser', + #package : 'Microdown-Tests', + #tag : 'Parser' } -{ #category : #running } +{ #category : 'running' } MicrodownParserTest >> parser [ "for now this reference is needed and cannot be changed into Microdown" ^ MicrodownParser new ] -{ #category : #running } +{ #category : 'running' } MicrodownParserTest >> setUp [ "Hooks that subclasses may override to define the fixture of test." @@ -24,7 +26,7 @@ MicrodownParserTest >> setUp [ parser := self parser ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicrodownParserTest >> stestMathBlockWithArguments [ | source root math | @@ -39,7 +41,7 @@ MicrodownParserTest >> stestMathBlockWithArguments [ self assert: (math arguments at: 'caption') first substring equals: 'doNiceMath' ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicrodownParserTest >> testAnchorBlock [ | source root annotated | source := AnchorMarkup, 'label1'. @@ -51,7 +53,7 @@ MicrodownParserTest >> testAnchorBlock [ ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicrodownParserTest >> testAnchorBlockFollowingEachOther [ | source root annotated | @@ -68,7 +70,7 @@ MicrodownParserTest >> testAnchorBlockFollowingEachOther [ ] -{ #category : #'tests - anchor' } +{ #category : 'tests - anchor' } MicrodownParserTest >> testAnchorMarkupInsideLine [ | source root paragraph | @@ -82,7 +84,7 @@ MicrodownParserTest >> testAnchorMarkupInsideLine [ ] -{ #category : #'tests - annotated-paragraph' } +{ #category : 'tests - annotated-paragraph' } MicrodownParserTest >> testAnnotatedBlock [ | source root annotated | @@ -96,7 +98,7 @@ MicrodownParserTest >> testAnnotatedBlock [ ] -{ #category : #'tests - annotated-paragraph' } +{ #category : 'tests - annotated-paragraph' } MicrodownParserTest >> testAnnotatedBlockOnMultipleLinesParserLogic [ | source root annotated line | @@ -125,7 +127,7 @@ important point because...!'. ] -{ #category : #'tests - annotated-paragraph' } +{ #category : 'tests - annotated-paragraph' } MicrodownParserTest >> testAnnotatedBlockOnTwoLines [ | source root annotated | source := AnnotatedParagraphMarkup , 'important this is an important @@ -139,7 +141,7 @@ paragraph on two lines.' ] -{ #category : #'tests - annotated-paragraph' } +{ #category : 'tests - annotated-paragraph' } MicrodownParserTest >> testAnnotatedBlockOnTwoLinesWithFormatting [ | source root annotated | source := AnnotatedParagraphMarkup , 'important **this** is an _important_ @@ -154,7 +156,7 @@ paragraph on two lines.'. self assert: annotated textElements third kind equals: 'italic'. ] -{ #category : #'tests - annotated-paragraph' } +{ #category : 'tests - annotated-paragraph' } MicrodownParserTest >> testAnnotatedBlockTextElements [ | source root annotated | @@ -169,7 +171,7 @@ MicrodownParserTest >> testAnnotatedBlockTextElements [ ] -{ #category : #'tests - annotated-paragraph' } +{ #category : 'tests - annotated-paragraph' } MicrodownParserTest >> testAnnotatedBlockWithListParserLogic [ "The test does not test what we want. We want a listblock inside the annotatedBlock" | source root annotated line | @@ -204,7 +206,7 @@ MicrodownParserTest >> testAnnotatedBlockWithListParserLogic [ ] -{ #category : #'tests - comments' } +{ #category : 'tests - comments' } MicrodownParserTest >> testCommentOnMultipleLines [ | source root comment | @@ -218,7 +220,7 @@ a second comment' ] -{ #category : #'tests - comments' } +{ #category : 'tests - comments' } MicrodownParserTest >> testCommentOnMultipleLinesWithASingleMarkup [ | source root comment | @@ -234,7 +236,7 @@ MicrodownParserTest >> testCommentOnMultipleLinesWithASingleMarkup [ ] -{ #category : #'tests - comments' } +{ #category : 'tests - comments' } MicrodownParserTest >> testCommentSimple [ | source root comment | @@ -246,7 +248,7 @@ MicrodownParserTest >> testCommentSimple [ ] -{ #category : #'tests - comments' } +{ #category : 'tests - comments' } MicrodownParserTest >> testCommentedLineMarkupInsideLine [ | source root paragraph | @@ -259,7 +261,7 @@ MicrodownParserTest >> testCommentedLineMarkupInsideLine [ ] -{ #category : #tests } +{ #category : 'tests' } MicrodownParserTest >> testEnvironmentCitationWithArguments [ | source root environmentName contents child | environmentName := 'cite'. @@ -278,7 +280,7 @@ Pharo'. self assert: (child arguments at: 'c') equals: nil ] -{ #category : #'tests - environment' } +{ #category : 'tests - environment' } MicrodownParserTest >> testEnvironmentEatsNonClosedCodeMarkup [ | source root env environmentName contents | environmentName := 'card'. @@ -298,7 +300,7 @@ this is the end.'. ] -{ #category : #tests } +{ #category : 'tests' } MicrodownParserTest >> testHandlePrefixTabs [ | source tree columns column codeBlock | source := ' @@ -324,7 +326,7 @@ MicrodownParserTest >> testHandlePrefixTabs [ self assert: codeBlock body lines second equals: (String tab, 'ifHuge: [ "Well, it is not" ]'). ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicrodownParserTest >> testHeaderLevel4 [ | source root | source := (HeaderMarkup repeat: 4), ' Level four'. @@ -334,7 +336,7 @@ MicrodownParserTest >> testHeaderLevel4 [ self assert: root children first level equals: 4 ] -{ #category : #'tests - header' } +{ #category : 'tests - header' } MicrodownParserTest >> testHeaderLevel4WithBold [ | source root | @@ -349,7 +351,7 @@ MicrodownParserTest >> testHeaderLevel4WithBold [ self assert: root children first level equals: 4. ] -{ #category : #'tests - horizontal' } +{ #category : 'tests - horizontal' } MicrodownParserTest >> testHorizontalBlock [ | source root horizontal | @@ -361,7 +363,7 @@ MicrodownParserTest >> testHorizontalBlock [ ] -{ #category : #'tests - horizontal' } +{ #category : 'tests - horizontal' } MicrodownParserTest >> testHorizontalBlockFollowedByList [ | source root horizontal | @@ -374,7 +376,7 @@ MicrodownParserTest >> testHorizontalBlockFollowedByList [ ] -{ #category : #'tests - horizontal line' } +{ #category : 'tests - horizontal line' } MicrodownParserTest >> testHorizontalLineBlock [ | source root horizontal | source := HorizontalLineMarkup, 'label1'. @@ -390,7 +392,7 @@ MicrodownParserTest >> testHorizontalLineBlock [ ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicrodownParserTest >> testMathBlock [ | source root math | @@ -406,7 +408,7 @@ MicrodownParserTest >> testMathBlock [ ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicrodownParserTest >> testMathBlockOnMulitpleLines [ | source root math | @@ -423,7 +425,7 @@ support(I) \geq minsup \}' ] -{ #category : #'tests - math' } +{ #category : 'tests - math' } MicrodownParserTest >> testMathBlockWithArguments [ | source root math | @@ -438,7 +440,7 @@ MicrodownParserTest >> testMathBlockWithArguments [ self assert: (math arguments at: 'caption') first substring equals: 'doNiceMath' ] -{ #category : #'tests - path' } +{ #category : 'tests - path' } MicrodownParserTest >> testParseEmpty [ | file system mic | @@ -452,7 +454,7 @@ MicrodownParserTest >> testParseEmpty [ self assert: (mic isKindOf: MicRootBlock) ] -{ #category : #'tests - horizontal line' } +{ #category : 'tests - horizontal line' } MicrodownParserTest >> testParseLineWithOneCharacter [ | document | @@ -463,7 +465,7 @@ a'. ] -{ #category : #'tests - horizontal line' } +{ #category : 'tests - horizontal line' } MicrodownParserTest >> testParseLineWithThreeCharacters [ | document | @@ -474,7 +476,7 @@ a`a'. ] -{ #category : #'tests - horizontal line' } +{ #category : 'tests - horizontal line' } MicrodownParserTest >> testParseLineWithTwoCharacters [ | document | @@ -485,7 +487,7 @@ aa'. ] -{ #category : #tests } +{ #category : 'tests' } MicrodownParserTest >> testParseText [ | mic | @@ -500,7 +502,7 @@ this is a code block self assert: mic children second body equals: 'this is a code block' ] -{ #category : #'tests - table' } +{ #category : 'tests - table' } MicrodownParserTest >> testPipeEscape [ | tableBlock firstElementOfSecondRowAsString| @@ -514,7 +516,7 @@ MicrodownParserTest >> testPipeEscape [ self assert: firstElementOfSecondRowAsString equals: '12|3' ] -{ #category : #'tests - breaking class comments' } +{ #category : 'tests - breaking class comments' } MicrodownParserTest >> testRBPatternVariableNode [ | paragraph1 paragraph2 paragraph3 | @@ -532,7 +534,7 @@ MicrodownParserTest >> testRBPatternVariableNode [ ' ] -{ #category : #'tests - table' } +{ #category : 'tests - table' } MicrodownParserTest >> testSimpleTable [ | mic | @@ -549,7 +551,7 @@ MicrodownParserTest >> testSimpleTable [ self assert: mic rows first first first class equals: MicTextBlock ] -{ #category : #'tests - error' } +{ #category : 'tests - error' } MicrodownParserTest >> testSimpleTableNoError [ "Microdown allows jagged tables - as implemented in MicTableBlock>>closeMe" self shouldnt: [ parser parse: ' @@ -563,7 +565,7 @@ MicrodownParserTest >> testSimpleTableNoError [ ] -{ #category : #'tests - table' } +{ #category : 'tests - table' } MicrodownParserTest >> testSimpleTableWithFormatting [ | mic | @@ -580,7 +582,7 @@ MicrodownParserTest >> testSimpleTableWithFormatting [ self assert: mic rows first first first class equals: MicBoldFormatBlock ] -{ #category : #'tests - table' } +{ #category : 'tests - table' } MicrodownParserTest >> testSimpleTableWithFormattingWithSomeElements [ | mic | @@ -603,7 +605,7 @@ MicrodownParserTest >> testSimpleTableWithFormattingWithSomeElements [ equals: MicItalicFormatBlock ] -{ #category : #'tests - table' } +{ #category : 'tests - table' } MicrodownParserTest >> testSimpleTableWithMoreLongRow [ | mic | @@ -620,7 +622,7 @@ MicrodownParserTest >> testSimpleTableWithMoreLongRow [ self assert: mic rows first first first class equals: MicTextBlock ] -{ #category : #'tests - table' } +{ #category : 'tests - table' } MicrodownParserTest >> testSimpleTableWithShortRow [ | mic | @@ -637,7 +639,7 @@ MicrodownParserTest >> testSimpleTableWithShortRow [ self assert: mic rows first first first class equals: MicTextBlock ] -{ #category : #'tests - comments' } +{ #category : 'tests - comments' } MicrodownParserTest >> testTwoCommentBlock [ | source root | source := '% test1 diff --git a/src/Microdown-Tests/MicrodownTest.class.st b/src/Microdown-Tests/MicrodownTest.class.st index dc009308..ce45e2b4 100644 --- a/src/Microdown-Tests/MicrodownTest.class.st +++ b/src/Microdown-Tests/MicrodownTest.class.st @@ -2,12 +2,14 @@ A MicrodownTest is a test class for testing the behavior of Microdown " Class { - #name : #MicrodownTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Core' + #name : 'MicrodownTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Core', + #package : 'Microdown-Tests', + #tag : 'Core' } -{ #category : #tests } +{ #category : 'tests' } MicrodownTest >> testMicrodownSpelledCorrect [ self assert: (Object allSubclasses select: [ :c | c name beginsWith: 'MicroDown' ]) isEmpty ] diff --git a/src/Microdown-Tests/MicrodownVisitorTest.class.st b/src/Microdown-Tests/MicrodownVisitorTest.class.st index 675ac82f..2f7dcb69 100644 --- a/src/Microdown-Tests/MicrodownVisitorTest.class.st +++ b/src/Microdown-Tests/MicrodownVisitorTest.class.st @@ -2,12 +2,14 @@ A MicrodownVisitorTest is a test class for testing the behavior of MicrodownVisitor " Class { - #name : #MicrodownVisitorTest, - #superclass : #TestCase, - #category : #'Microdown-Tests-Visitor' + #name : 'MicrodownVisitorTest', + #superclass : 'TestCase', + #category : 'Microdown-Tests-Visitor', + #package : 'Microdown-Tests', + #tag : 'Visitor' } -{ #category : #tests } +{ #category : 'tests' } MicrodownVisitorTest >> testAllVisitMethodsExists [ "Check that all visitSomeBlockType: used in an accept: method are implemented in MicrodownVisitor. See Issue https://github.com/pillar-markup/Microdown/issues/533" diff --git a/src/Microdown-Tests/package.st b/src/Microdown-Tests/package.st index 31693ac4..93e8ae93 100644 --- a/src/Microdown-Tests/package.st +++ b/src/Microdown-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Tests' } +Package { #name : 'Microdown-Tests' } diff --git a/src/Microdown-Transformer-Tests/MicFileIncluderTest.class.st b/src/Microdown-Transformer-Tests/MicFileIncluderTest.class.st index acafb5fb..08b1e3f2 100644 --- a/src/Microdown-Transformer-Tests/MicFileIncluderTest.class.st +++ b/src/Microdown-Transformer-Tests/MicFileIncluderTest.class.st @@ -1,15 +1,16 @@ Class { - #name : #MicFileIncluderTest, - #superclass : #TestCase, + #name : 'MicFileIncluderTest', + #superclass : 'TestCase', #instVars : [ 'filesystem', 'includer', 'builder' ], - #category : #'Microdown-Transformer-Tests' + #category : 'Microdown-Transformer-Tests', + #package : 'Microdown-Transformer-Tests' } -{ #category : #running } +{ #category : 'running' } MicFileIncluderTest >> generateFilesystemExample [ | file | @@ -31,7 +32,7 @@ Pharo is **cool** ' ] ] -{ #category : #running } +{ #category : 'running' } MicFileIncluderTest >> setUp [ super setUp. filesystem := FileSystem memory. @@ -43,7 +44,7 @@ MicFileIncluderTest >> setUp [ ] -{ #category : #'tests - simple' } +{ #category : 'tests - simple' } MicFileIncluderTest >> testBeforeIncludingTheInputFile [ | root file reference | @@ -61,7 +62,7 @@ MicFileIncluderTest >> testBeforeIncludingTheInputFile [ ] -{ #category : #'tests - simple' } +{ #category : 'tests - simple' } MicFileIncluderTest >> testGenerateFilesystemIsGood [ self assert: (filesystem workingDirectory / 'anExample1.md') contents equals: '# Foo @@ -81,7 +82,7 @@ Pharo is **cool** ' ] -{ #category : #tests } +{ #category : 'tests' } MicFileIncluderTest >> testHandleNestedFileResolution [ | root file reference | @@ -122,7 +123,7 @@ MicFileIncluderTest >> testHandleNestedFileResolution [ ] -{ #category : #tests } +{ #category : 'tests' } MicFileIncluderTest >> testHandleNestedFileResolutionOnDifferentLevel [ | root file reference | @@ -164,7 +165,7 @@ MicFileIncluderTest >> testHandleNestedFileResolutionOnDifferentLevel [ ] -{ #category : #tests } +{ #category : 'tests' } MicFileIncluderTest >> testIncluderIncludesInputFileFromTheSameLevel [ | root file reference | @@ -202,7 +203,7 @@ MicFileIncluderTest >> testIncluderIncludesInputFileFromTheSameLevel [ ] -{ #category : #tests } +{ #category : 'tests' } MicFileIncluderTest >> testIncluderIncludesInputFilesWithinTheSameParagraph [ "As a general remark I do not like that the input can produce document that are not correct from a parser point of view. For example we should have a paragraph containing an header and this is what the transformation of the includer is doing." | root file reference | @@ -230,7 +231,7 @@ MicFileIncluderTest >> testIncluderIncludesInputFilesWithinTheSameParagraph [ self assert: root children sixth class equals: MicCodeBlock ] -{ #category : #tests } +{ #category : 'tests' } MicFileIncluderTest >> testIncluderJustReturnInputFileBlockWhenIncludedFileDoesNotExist [ | root file reference | @@ -249,7 +250,7 @@ MicFileIncluderTest >> testIncluderJustReturnInputFileBlockWhenIncludedFileDoesN self assert: root children first class equals: MicInputfileBlock. ] -{ #category : #tests } +{ #category : 'tests' } MicFileIncluderTest >> testMicFileInclusionTransformMicInputFiles [ | root file reference | diff --git a/src/Microdown-Transformer-Tests/MicNodeTransformerCodeDeleterMock.class.st b/src/Microdown-Transformer-Tests/MicNodeTransformerCodeDeleterMock.class.st index 8849ccf8..be9fb48b 100644 --- a/src/Microdown-Transformer-Tests/MicNodeTransformerCodeDeleterMock.class.st +++ b/src/Microdown-Transformer-Tests/MicNodeTransformerCodeDeleterMock.class.st @@ -2,18 +2,19 @@ I'm a silly `MicNodeTransformer`: I delete code block and replace paragraph by text. " Class { - #name : #MicNodeTransformerCodeDeleterMock, - #superclass : #MicNodeTransformer, - #category : #'Microdown-Transformer-Tests' + #name : 'MicNodeTransformerCodeDeleterMock', + #superclass : 'MicNodeTransformer', + #category : 'Microdown-Transformer-Tests', + #package : 'Microdown-Transformer-Tests' } -{ #category : #visiting } +{ #category : 'visiting' } MicNodeTransformerCodeDeleterMock >> visitCode: aCode [ self delete ] -{ #category : #visiting } +{ #category : 'visiting' } MicNodeTransformerCodeDeleterMock >> visitParagraph: aParagraph [ self replaceCurrentNodeBy: { MicTextBlock new substring: 'test' } diff --git a/src/Microdown-Transformer-Tests/MicNodeTransformerTest.class.st b/src/Microdown-Transformer-Tests/MicNodeTransformerTest.class.st index 6527b9d9..c3494bb0 100644 --- a/src/Microdown-Transformer-Tests/MicNodeTransformerTest.class.st +++ b/src/Microdown-Transformer-Tests/MicNodeTransformerTest.class.st @@ -1,20 +1,21 @@ Class { - #name : #MicNodeTransformerTest, - #superclass : #TestCase, + #name : 'MicNodeTransformerTest', + #superclass : 'TestCase', #instVars : [ 'transformer' ], - #category : #'Microdown-Transformer-Tests' + #category : 'Microdown-Transformer-Tests', + #package : 'Microdown-Transformer-Tests' } -{ #category : #running } +{ #category : 'running' } MicNodeTransformerTest >> setUp [ super setUp. transformer := MicNodeTransformerCodeDeleterMock new ] -{ #category : #tests } +{ #category : 'tests' } MicNodeTransformerTest >> testDeleteNode [ | root | @@ -26,7 +27,7 @@ this is a paragraph self assert: root children size equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } MicNodeTransformerTest >> testReplaceNodeByAnotherNode [ | root | diff --git a/src/Microdown-Transformer-Tests/package.st b/src/Microdown-Transformer-Tests/package.st index d143a3e4..f25f21c6 100644 --- a/src/Microdown-Transformer-Tests/package.st +++ b/src/Microdown-Transformer-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Transformer-Tests' } +Package { #name : 'Microdown-Transformer-Tests' } diff --git a/src/Microdown-Transformer/MicCyclicFileInclusionError.class.st b/src/Microdown-Transformer/MicCyclicFileInclusionError.class.st index 6ce96024..ab540937 100644 --- a/src/Microdown-Transformer/MicCyclicFileInclusionError.class.st +++ b/src/Microdown-Transformer/MicCyclicFileInclusionError.class.st @@ -1,13 +1,14 @@ Class { - #name : #MicCyclicFileInclusionError, - #superclass : #Error, + #name : 'MicCyclicFileInclusionError', + #superclass : 'Error', #instVars : [ 'files' ], - #category : #'Microdown-Transformer' + #category : 'Microdown-Transformer', + #package : 'Microdown-Transformer' } -{ #category : #accessing } +{ #category : 'accessing' } MicCyclicFileInclusionError >> files: aCollection [ files := aCollection ] diff --git a/src/Microdown-Transformer/MicElement.extension.st b/src/Microdown-Transformer/MicElement.extension.st index 21b6fb7b..297cdb29 100644 --- a/src/Microdown-Transformer/MicElement.extension.st +++ b/src/Microdown-Transformer/MicElement.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicElement } +Extension { #name : 'MicElement' } -{ #category : #'*Microdown-Transformer' } +{ #category : '*Microdown-Transformer' } MicElement >> inlineInputFiles [ "Assume all input has been resolved." MicFileIncluder new visit: self diff --git a/src/Microdown-Transformer/MicFileIncluder.class.st b/src/Microdown-Transformer/MicFileIncluder.class.st index 03d2e64f..73f6bc8d 100644 --- a/src/Microdown-Transformer/MicFileIncluder.class.st +++ b/src/Microdown-Transformer/MicFileIncluder.class.st @@ -16,8 +16,8 @@ Such `figures/setUpTearDown.png` file should get its path being: `Books/Book1/SU Note that if the path does not exist the transformer does nothing. " Class { - #name : #MicFileIncluder, - #superclass : #MicNodeTransformer, + #name : 'MicFileIncluder', + #superclass : 'MicNodeTransformer', #instVars : [ 'shouldTransform', 'input', @@ -25,26 +25,27 @@ Class { 'inProcessFiles', 'isStrict' ], - #category : #'Microdown-Transformer' + #category : 'Microdown-Transformer', + #package : 'Microdown-Transformer' } -{ #category : #initialization } +{ #category : 'initialization' } MicFileIncluder >> beRelaxed [ isStrict := false ] -{ #category : #configuration } +{ #category : 'configuration' } MicFileIncluder >> doNotTransform [ shouldTransform := false ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileIncluder >> inProcessFiles: aCollection [ inProcessFiles := aCollection ] -{ #category : #initialization } +{ #category : 'initialization' } MicFileIncluder >> initialize [ super initialize. @@ -52,24 +53,24 @@ MicFileIncluder >> initialize [ inProcessFiles := #() ] -{ #category : #'visiting-document' } +{ #category : 'visiting-document' } MicFileIncluder >> input: anInputDocument [ input := anInputDocument ] -{ #category : #testing } +{ #category : 'testing' } MicFileIncluder >> shouldTransform [ ^ shouldTransform ifNil: [ shouldTransform := true ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileIncluder >> topFile: aFileReference [ topFile := aFileReference ] -{ #category : #validation } +{ #category : 'validation' } MicFileIncluder >> validateInclusionOfFile: aFileReference [ aFileReference = topFile ifTrue: [ @@ -84,7 +85,7 @@ MicFileIncluder >> validateInclusionOfFile: aFileReference [ signal ] ] -{ #category : #'visiting-document' } +{ #category : 'visiting-document' } MicFileIncluder >> visitInputFile: anInputFileAnnotation [ "I load the file and if the file exist I replace the node of the annotation by the content of the file." diff --git a/src/Microdown-Transformer/MicInputDocument.class.st b/src/Microdown-Transformer/MicInputDocument.class.st index b70cfde1..c66a474b 100644 --- a/src/Microdown-Transformer/MicInputDocument.class.st +++ b/src/Microdown-Transformer/MicInputDocument.class.st @@ -3,22 +3,23 @@ I'm a little file wrapper so that we can mix pillar and microdown file within a As such I'm responsible to determine how my instances are parsed. " Class { - #name : #MicInputDocument, - #superclass : #Object, + #name : 'MicInputDocument', + #superclass : 'Object', #instVars : [ 'project', 'file' ], - #category : #'Microdown-Transformer' + #category : 'Microdown-Transformer', + #package : 'Microdown-Transformer' } -{ #category : #factory } +{ #category : 'factory' } MicInputDocument class >> forFile: aFile [ ^ (self inputClassForFile: aFile) new file: aFile ; yourself ] -{ #category : #factory } +{ #category : 'factory' } MicInputDocument class >> inputClassForFile: aFile [ ^ self subclasses @@ -26,13 +27,13 @@ MicInputDocument class >> inputClassForFile: aFile [ ifNone: [ MicNoInputDocument ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicInputDocument >> basename [ ^ file basename ] -{ #category : #building } +{ #category : 'building' } MicInputDocument >> contributeToPipelineBuilding: aPRPipelineBuilder [ self error: 'To be fixed'. @@ -42,28 +43,28 @@ MicInputDocument >> contributeToPipelineBuilding: aPRPipelineBuilder [ aPRPipelineBuilder parser: self parser ] -{ #category : #accessing } +{ #category : 'accessing' } MicInputDocument >> file [ ^ file ] -{ #category : #accessing } +{ #category : 'accessing' } MicInputDocument >> file: aFileReference [ file := aFileReference ] -{ #category : #accessing } +{ #category : 'accessing' } MicInputDocument >> fullName [ ^ file fullName ] -{ #category : #accessing } +{ #category : 'accessing' } MicInputDocument >> path [ ^ file path ] -{ #category : #printing } +{ #category : 'printing' } MicInputDocument >> printOn: aStream [ aStream nextPutAll: self class name; @@ -72,12 +73,12 @@ MicInputDocument >> printOn: aStream [ nextPutAll: ')' ] -{ #category : #accessing } +{ #category : 'accessing' } MicInputDocument >> project [ ^ project ] -{ #category : #accessing } +{ #category : 'accessing' } MicInputDocument >> project: aProject [ project := aProject ] diff --git a/src/Microdown-Transformer/MicMicrodownInputDocument.class.st b/src/Microdown-Transformer/MicMicrodownInputDocument.class.st index a8fd9092..f4c5ace6 100644 --- a/src/Microdown-Transformer/MicMicrodownInputDocument.class.st +++ b/src/Microdown-Transformer/MicMicrodownInputDocument.class.st @@ -3,24 +3,25 @@ I make sure that microdown file are parsed with a microdown parser. This way I can integrate within the pillar pipeline in a modular way. " Class { - #name : #MicMicrodownInputDocument, - #superclass : #MicInputDocument, - #category : #'Microdown-Transformer' + #name : 'MicMicrodownInputDocument', + #superclass : 'MicInputDocument', + #category : 'Microdown-Transformer', + #package : 'Microdown-Transformer' } -{ #category : #registration } +{ #category : 'registration' } MicMicrodownInputDocument class >> doesHandleExtension: anExtension [ ^ #('md' 'mic' 'MD' 'MIC') includes: anExtension ] -{ #category : #accessing } +{ #category : 'accessing' } MicMicrodownInputDocument >> parsedDocument [ ^ self parserClass new parse: file contents ] -{ #category : #accessing } +{ #category : 'accessing' } MicMicrodownInputDocument >> parserClass [ ^ MicAbstractBlock new parserClass diff --git a/src/Microdown-Transformer/MicNoInputDocument.class.st b/src/Microdown-Transformer/MicNoInputDocument.class.st index e49f0c1b..d90b4a6b 100644 --- a/src/Microdown-Transformer/MicNoInputDocument.class.st +++ b/src/Microdown-Transformer/MicNoInputDocument.class.st @@ -2,18 +2,19 @@ I represent unknown file extension. " Class { - #name : #MicNoInputDocument, - #superclass : #MicInputDocument, - #category : #'Microdown-Transformer' + #name : 'MicNoInputDocument', + #superclass : 'MicInputDocument', + #category : 'Microdown-Transformer', + #package : 'Microdown-Transformer' } -{ #category : #registration } +{ #category : 'registration' } MicNoInputDocument class >> doesHandleExtension: anExtension [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } MicNoInputDocument >> parserClass [ "may be the error should not be raised here." diff --git a/src/Microdown-Transformer/MicNodeTransformer.class.st b/src/Microdown-Transformer/MicNodeTransformer.class.st index 4d286815..ead51e95 100644 --- a/src/Microdown-Transformer/MicNodeTransformer.class.st +++ b/src/Microdown-Transformer/MicNodeTransformer.class.st @@ -5,16 +5,17 @@ I'm used for example to replace a codeblock by the result of the evaluation of t Another important example is how to input a file in another one. " Class { - #name : #MicNodeTransformer, - #superclass : #MicrodownVisitor, + #name : 'MicNodeTransformer', + #superclass : 'MicrodownVisitor', #instVars : [ 'replacement', 'configuration' ], - #category : #'Microdown-Transformer' + #category : 'Microdown-Transformer', + #package : 'Microdown-Transformer' } -{ #category : #execution } +{ #category : 'execution' } MicNodeTransformer class >> executeOn: aMicContext [ self new "configuration: aMicContext configuration;" @@ -22,7 +23,7 @@ MicNodeTransformer class >> executeOn: aMicContext [ ^ aMicContext ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicNodeTransformer class >> withContext: aContext [ "The API is done this way (without using the parameter) because most of the subclasses do not need to access the context of the process (such as files, configuration). Some subclasses may get access by redefine it." @@ -30,41 +31,41 @@ MicNodeTransformer class >> withContext: aContext [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicNodeTransformer >> configuration [ ^ configuration ] -{ #category : #accessing } +{ #category : 'accessing' } MicNodeTransformer >> configuration: anObject [ configuration := anObject. ] -{ #category : #enumerating } +{ #category : 'enumerating' } MicNodeTransformer >> delete [ "When we do a transformation I replace the current node by nothing." self replaceCurrentNodeBy: { } ] -{ #category : #execution } +{ #category : 'execution' } MicNodeTransformer >> executeOn: aMicContext [ self visit: aMicContext input. ^ aMicContext ] -{ #category : #enumerating } +{ #category : 'enumerating' } MicNodeTransformer >> initialize [ super initialize. replacement := Stack new ] -{ #category : #execution } +{ #category : 'execution' } MicNodeTransformer >> replaceChildrenOf: aGroup [ aGroup children: @@ -75,7 +76,7 @@ MicNodeTransformer >> replaceChildrenOf: aGroup [ replacement pop]). ] -{ #category : #enumerating } +{ #category : 'enumerating' } MicNodeTransformer >> replaceCurrentNodeBy: newNodes [ "When we do a transformation I replace the current node by its transformation." @@ -83,19 +84,19 @@ MicNodeTransformer >> replaceCurrentNodeBy: newNodes [ replacement push: newNodes ] -{ #category : #execution } +{ #category : 'execution' } MicNodeTransformer >> visit: anObject [ super visit: anObject. ^ anObject ] -{ #category : #execution } +{ #category : 'execution' } MicNodeTransformer >> visitAll: aGroup [ self replaceChildrenOf: aGroup. aGroup accept: self. ] -{ #category : #execution } +{ #category : 'execution' } MicNodeTransformer >> visitRoot: aGroup [ self replaceChildrenOf: aGroup ] diff --git a/src/Microdown-Transformer/MicRootBlock.extension.st b/src/Microdown-Transformer/MicRootBlock.extension.st index 4b1fdee7..55823f72 100644 --- a/src/Microdown-Transformer/MicRootBlock.extension.st +++ b/src/Microdown-Transformer/MicRootBlock.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MicRootBlock } +Extension { #name : 'MicRootBlock' } -{ #category : #'*Microdown-Transformer' } +{ #category : '*Microdown-Transformer' } MicRootBlock >> includeFor: aFile [ | inclusionVisitor | diff --git a/src/Microdown-Transformer/RelativePath.extension.st b/src/Microdown-Transformer/RelativePath.extension.st index 0c1abe0e..fc38c9ee 100644 --- a/src/Microdown-Transformer/RelativePath.extension.st +++ b/src/Microdown-Transformer/RelativePath.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RelativePath } +Extension { #name : 'RelativePath' } -{ #category : #'*Microdown-Transformer' } +{ #category : '*Microdown-Transformer' } RelativePath >> microdownPrintString [ self isEmpty ifTrue: [ ^ '' ]. ^ String streamContents: [ :str | diff --git a/src/Microdown-Transformer/package.st b/src/Microdown-Transformer/package.st index 3d8ab952..6c81d7c5 100644 --- a/src/Microdown-Transformer/package.st +++ b/src/Microdown-Transformer/package.st @@ -1 +1 @@ -Package { #name : #'Microdown-Transformer' } +Package { #name : 'Microdown-Transformer' } diff --git a/src/Microdown/BaselineOf.extension.st b/src/Microdown/BaselineOf.extension.st index c75aa4b0..2213f4de 100644 --- a/src/Microdown/BaselineOf.extension.st +++ b/src/Microdown/BaselineOf.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #BaselineOf } +Extension { #name : 'BaselineOf' } -{ #category : #'*Microdown' } +{ #category : '*Microdown' } BaselineOf class >> buildMicroDownUsing: aBuilder withComment: aString [ aBuilder header: [ aBuilder text: self name ] withLevel: 1; diff --git a/src/Microdown/Class.extension.st b/src/Microdown/Class.extension.st index 3343f437..ddfd451d 100644 --- a/src/Microdown/Class.extension.st +++ b/src/Microdown/Class.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Class } +Extension { #name : 'Class' } -{ #category : #'*Microdown' } +{ #category : '*Microdown' } Class >> addDocumentSectionExampleCodeTo: aBuilder [ | exampleCode | @@ -13,7 +13,7 @@ Class >> addDocumentSectionExampleCodeTo: aBuilder [ aBuilder codeblock: exampleCode ] -{ #category : #'*Microdown' } +{ #category : '*Microdown' } Class >> addDocumentSectionTo: aBuilder label: label methods: methods [ methods ifEmpty: [ ^ self ]. @@ -26,7 +26,7 @@ Class >> addDocumentSectionTo: aBuilder label: label methods: methods [ aBuilder monospace: (each methodClass name, '>>#', each selector) ] ] ] ] -{ #category : #'*Microdown' } +{ #category : '*Microdown' } Class >> buildMicroDownUsing: aBuilder withComment: aString [ aBuilder @@ -43,7 +43,7 @@ Class >> buildMicroDownUsing: aBuilder withComment: aString [ methods: (self class methods select: [ :each | each protocol = self documentExamplesProtocol ]) ] -{ #category : #'*Microdown' } +{ #category : '*Microdown' } Class >> documentExampleCode [ | exampleMethod | @@ -60,13 +60,13 @@ Class >> documentExampleCode [ trimmed ] -{ #category : #'*Microdown' } +{ #category : '*Microdown' } Class >> documentExampleCodeSelector [ ^ 'example*' ] -{ #category : #'*Microdown' } +{ #category : '*Microdown' } Class >> documentExamplesProtocol [ ^ #'*Examples' diff --git a/src/Microdown/FileReference.extension.st b/src/Microdown/FileReference.extension.st index 4e76f3c7..e6c4ac90 100644 --- a/src/Microdown/FileReference.extension.st +++ b/src/Microdown/FileReference.extension.st @@ -1,11 +1,11 @@ -Extension { #name : #FileReference } +Extension { #name : 'FileReference' } -{ #category : #'*Microdown' } +{ #category : '*Microdown' } FileReference >> asMicResourceReference [ ^ MicFileResourceReference fromFileRef: self ] -{ #category : #'*Microdown' } +{ #category : '*Microdown' } FileReference >> resolveDocument: document [ ^ self asMicResourceReference resolveDocument: document. ] diff --git a/src/Microdown/ManifestMicrodown.class.st b/src/Microdown/ManifestMicrodown.class.st index 3e38e8c7..e83f9f6d 100644 --- a/src/Microdown/ManifestMicrodown.class.st +++ b/src/Microdown/ManifestMicrodown.class.st @@ -64,17 +64,19 @@ Such packages should be moved in the future to other location (probably pillar i I was implemented by S. Ducasse, L. Dargaud and G. Polito. It is based on the work on markdown parsing of K. Osterbye. " Class { - #name : #ManifestMicrodown, - #superclass : #PackageManifest, - #category : #'Microdown-Manifest' + #name : 'ManifestMicrodown', + #superclass : 'PackageManifest', + #category : 'Microdown-Manifest', + #package : 'Microdown', + #tag : 'Manifest' } -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestMicrodown class >> ruleAnySatisfyRuleV1FalsePositive [ ^ #(#(#(#RGMethodDefinition #(#'MicFileResourceReference class' #hostOf: #true)) #'2022-01-15T12:11:48.574879+01:00') ) ] -{ #category : #'code-critics' } +{ #category : 'code-critics' } ManifestMicrodown class >> ruleUtilityMethodsRuleV1FalsePositive [ ^ #(#(#(#RGMethodDefinition #(#MicElement #resolveFrom: #false)) #'2022-04-27T08:53:19.440198+02:00') ) ] diff --git a/src/Microdown/MicAbsoluteResourceReference.class.st b/src/Microdown/MicAbsoluteResourceReference.class.st index 49ded109..fe7a9a11 100644 --- a/src/Microdown/MicAbsoluteResourceReference.class.st +++ b/src/Microdown/MicAbsoluteResourceReference.class.st @@ -5,56 +5,58 @@ A reference will then be resolved and produces a resource. Common for all absolute references is that they store their reference in a uri (ZnUrl). " Class { - #name : #MicAbsoluteResourceReference, - #superclass : #MicResourceReference, + #name : 'MicAbsoluteResourceReference', + #superclass : 'MicResourceReference', #instVars : [ 'uri' ], - #category : #'Microdown-Core' + #category : 'Microdown-Core', + #package : 'Microdown', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } MicAbsoluteResourceReference >> binaryReadStream [ "return the binaryStream I refer to" self subclassResponsibility. ] -{ #category : #testing } +{ #category : 'testing' } MicAbsoluteResourceReference >> canSave [ "return true if I implement contents: " ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbsoluteResourceReference >> contents [ "return the contents I refer to" self subclassResponsibility. ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbsoluteResourceReference >> contents: aString [ "Some of my subclasses can be written to. By default you cannot, and I then give an error" MicResourceReferenceError signal: self printString, ' can not be given new contents' ] -{ #category : #testing } +{ #category : 'testing' } MicAbsoluteResourceReference >> isMicrodownResourceFileReference [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbsoluteResourceReference >> loadChildren [ "return a collection of absolute child references" ^#() ] -{ #category : #loading } +{ #category : 'loading' } MicAbsoluteResourceReference >> loadImage [ "Throws UnrecognizedImageFormatError in case Pharo does not understand this image type (for exampel svg is not supported)" ^ ImageReadWriter formFromStream: self binaryReadStream ] -{ #category : #loading } +{ #category : 'loading' } MicAbsoluteResourceReference >> loadMicrodown [ "I am an absolute reference, so I can load completely" | doc| @@ -63,13 +65,13 @@ MicAbsoluteResourceReference >> loadMicrodown [ ^ doc ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbsoluteResourceReference >> path [ "return the path part of my uri" ^ '/', uri path ] -{ #category : #printing } +{ #category : 'printing' } MicAbsoluteResourceReference >> printOn: aStream [ super printOn: aStream. aStream @@ -78,7 +80,7 @@ MicAbsoluteResourceReference >> printOn: aStream [ nextPutAll: ')' ] -{ #category : #visiting } +{ #category : 'visiting' } MicAbsoluteResourceReference >> resolveDocument: document [ MicZincPathResolver resolve: document @@ -86,18 +88,18 @@ MicAbsoluteResourceReference >> resolveDocument: document [ ^ document ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbsoluteResourceReference >> uri [ ^ uri ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbsoluteResourceReference >> uri: aZnUrl [ uri := aZnUrl ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbsoluteResourceReference >> uriString [ ^ uri printString ] diff --git a/src/Microdown/MicAbstractAnnotatedBlock.class.st b/src/Microdown/MicAbstractAnnotatedBlock.class.st index 0f9f9a70..5ce4d72a 100644 --- a/src/Microdown/MicAbstractAnnotatedBlock.class.st +++ b/src/Microdown/MicAbstractAnnotatedBlock.class.st @@ -1,15 +1,17 @@ Class { - #name : #MicAbstractAnnotatedBlock, - #superclass : #MicAbstractBlock, + #name : 'MicAbstractAnnotatedBlock', + #superclass : 'MicAbstractBlock', #instVars : [ 'label', 'isClosed', 'body' ], - #category : #'Microdown-Model' + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #public } +{ #category : 'public' } MicAbstractAnnotatedBlock >> addLineAndReturnNextNode: line [ "line is assumed to be of the form '!!label some text'" @@ -26,12 +28,12 @@ MicAbstractAnnotatedBlock >> addLineAndReturnNextNode: line [ ifNotNil: [ body := body , String cr , line ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractAnnotatedBlock >> body [ ^ body ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractAnnotatedBlock >> canConsumeLine: line [ "return if this block can consume line" @@ -39,19 +41,19 @@ MicAbstractAnnotatedBlock >> canConsumeLine: line [ ^ line isNotEmpty ] -{ #category : #initialization } +{ #category : 'initialization' } MicAbstractAnnotatedBlock >> initialize [ super initialize. isClosed := false. ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractAnnotatedBlock >> label [ ^ label ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractAnnotatedBlock >> lineMarkup [ ^ self subclassResponsibility diff --git a/src/Microdown/MicAbstractBlock.class.st b/src/Microdown/MicAbstractBlock.class.st index 86da394c..51dcc051 100644 --- a/src/Microdown/MicAbstractBlock.class.st +++ b/src/Microdown/MicAbstractBlock.class.st @@ -7,28 +7,30 @@ I have a set of children, and an uplink to my parent. See the comment of `MicroDownParser` for an overview of the algorithm used in building such parse tree. " Class { - #name : #MicAbstractBlock, - #superclass : #MicElement, + #name : 'MicAbstractBlock', + #superclass : 'MicElement', #instVars : [ 'children', 'parser' ], - #category : #'Microdown-Model' + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #public } +{ #category : 'public' } MicAbstractBlock class >> alternateBlockClassFor: line [ "This hook supports extensions of environments. we get > addChild: childBlock [ children add: childBlock ] -{ #category : #public } +{ #category : 'public' } MicAbstractBlock >> addLineAndReturnNextNode: line [ "add line to this node. Notice, the action is allowed to create new nodes in the block tree. @@ -38,81 +40,81 @@ MicAbstractBlock >> addLineAndReturnNextNode: line [ ^ self ] -{ #category : #public } +{ #category : 'public' } MicAbstractBlock >> blockExtensionStarterClassFrom: line [ "return the class of a block which can start with line, or nil if none" ^ nil ] -{ #category : #public } +{ #category : 'public' } MicAbstractBlock >> blockStarterClassFrom: line [ "return the class of a block which can start with line, or nil if none" ^ (self parser blockStarterClassFrom: line) ifNotNil: [ :c | c alternateBlockClassFor: line ] ] -{ #category : #public } +{ #category : 'public' } MicAbstractBlock >> canConsumeLine: line [ "return if this block can consume line" ^ self subclassResponsibility ] -{ #category : #adding } +{ #category : 'adding' } MicAbstractBlock >> children [ ^children ] -{ #category : #adding } +{ #category : 'adding' } MicAbstractBlock >> children: aCollection [ children := aCollection ] -{ #category : #public } +{ #category : 'public' } MicAbstractBlock >> closeMe [ "I'm hook for closing elements. By default do nothing." ^ self ] -{ #category : #public } +{ #category : 'public' } MicAbstractBlock >> computeNestedLevel [ ^ 0 ] -{ #category : #properties } +{ #category : 'properties' } MicAbstractBlock >> hasProperty: aKey [ "Test if the property aKey is present." ^ self properties notNil and: [ self properties includesKey: aKey ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractBlock >> indent [ ^ parent indent ] -{ #category : #initialization } +{ #category : 'initialization' } MicAbstractBlock >> initialize [ super initialize. children := OrderedCollection new. ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractBlock >> listItemBlockClass [ ^ MicListItemBlock ] -{ #category : #public } +{ #category : 'public' } MicAbstractBlock >> nestedLevel [ "Return the nesting level of main blocks. Basically only list increases this." ^ 0 ] -{ #category : #public } +{ #category : 'public' } MicAbstractBlock >> newBlockFor: line parent: parentBlock [ | newBlockClass | newBlockClass := self blockStarterClassFrom: line. @@ -123,44 +125,44 @@ MicAbstractBlock >> newBlockFor: line parent: parentBlock [ addLineAndReturnNextNode: line ] -{ #category : #private } +{ #category : 'private' } MicAbstractBlock >> parser [ ^ parser ] -{ #category : #private } +{ #category : 'private' } MicAbstractBlock >> parserClass [ ^ MicrodownParser ] -{ #category : #replacement } +{ #category : 'replacement' } MicAbstractBlock >> replace: aBlock by: anotherBlock [ children replaceAll: aBlock with: anotherBlock ] -{ #category : #replacement } +{ #category : 'replacement' } MicAbstractBlock >> replace: aBlock byCollection: aCollection [ children := children copyReplaceAll: {aBlock} with: aCollection ] -{ #category : #replacement } +{ #category : 'replacement' } MicAbstractBlock >> replaceBy: anotherBlock [ self parent replace: self by: anotherBlock ] -{ #category : #replacement } +{ #category : 'replacement' } MicAbstractBlock >> replaceByAll: aCollection [ self parent replace: self byCollection: aCollection ] -{ #category : #private } +{ #category : 'private' } MicAbstractBlock >> setParser: aParser [ parser := aParser ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractBlock >> text [ | text | self flag: #todo. diff --git a/src/Microdown/MicAbstractCodeBlock.class.st b/src/Microdown/MicAbstractCodeBlock.class.st index 1c08b322..e18ef8f0 100644 --- a/src/Microdown/MicAbstractCodeBlock.class.st +++ b/src/Microdown/MicAbstractCodeBlock.class.st @@ -2,12 +2,14 @@ I am common class for two extension blocks which at the moment shares the same syntax. " Class { - #name : #MicAbstractCodeBlock, - #superclass : #MicSameStartStopMarkupBlock, - #category : #'Microdown-Model' + #name : 'MicAbstractCodeBlock', + #superclass : 'MicSameStartStopMarkupBlock', + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #public } +{ #category : 'public' } MicAbstractCodeBlock class >> alternateBlockClassFor: line [ "If there is one subclass with the corresponding tag, returns it, else resturn the current class." @@ -20,17 +22,17 @@ MicAbstractCodeBlock class >> alternateBlockClassFor: line [ ^ MicScriptBlock allSubclasses detect: [ :each | each tag = tag ] ifNone: [ MicCodeBlock ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractCodeBlock class >> defaultLanguage [ ^ 'Pharo' ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractCodeBlock >> language [ ^ arguments at: #language ] -{ #category : #utilities } +{ #category : 'utilities' } MicAbstractCodeBlock >> lineStartMarkup [ "a code block is delimited by ``` " diff --git a/src/Microdown/MicAbstractDelimiter.class.st b/src/Microdown/MicAbstractDelimiter.class.st index a011d0f0..732f1c4b 100644 --- a/src/Microdown/MicAbstractDelimiter.class.st +++ b/src/Microdown/MicAbstractDelimiter.class.st @@ -15,132 +15,134 @@ My index refers to the index character in global string which is parsed. Always instantiate me with my constructor ""index:"" to precise it. " Class { - #name : #MicAbstractDelimiter, - #superclass : #Object, + #name : 'MicAbstractDelimiter', + #superclass : 'Object', #instVars : [ 'index' ], #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Parser' + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> allActive [ ^ self allSubclasses select: [ :subclass | subclass isActive ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> associatedInlineBlock [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> associatedTypes [ ^ { self type } ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> index: anIndex [ ^ self new index: anIndex; yourself ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractDelimiter class >> isActive [ ^ true ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractDelimiter class >> isBoth [ ^ self isCloser and: self isOpener ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> isCloser [ ^ self subclassResponsibility ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractDelimiter class >> isCloserOnly [ ^ self isCloser and: self isOpener not ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> isOpener [ ^ self subclassResponsibility ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractDelimiter class >> isOpenerOnly [ ^ self isCloser not and: [ self isOpener ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> markup [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> size [ ^ self markup size ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter class >> type [ ^ self subclassResponsibility ] -{ #category : #dispatching } +{ #category : 'dispatching' } MicAbstractDelimiter >> addInlineBlock: anIndex to: inlineParser [ inlineParser addRegularInlineBlock: anIndex ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter >> associatedInlineBlock [ ^ self class associatedInlineBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter >> endIndex [ ^ self index - 1 ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter >> index [ ^ index ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter >> index: anInteger [ index := anInteger ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractDelimiter >> isActive [ ^ self class isActive ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractDelimiter >> isCloser [ ^ self class isCloser ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractDelimiter >> isOpener [ ^ self class isOpener ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractDelimiter >> markup [ ^ self class markup ] -{ #category : #printing } +{ #category : 'printing' } MicAbstractDelimiter >> printOn: aStream [ | name | name := self class name. @@ -149,12 +151,12 @@ MicAbstractDelimiter >> printOn: aStream [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter >> size [ ^ self class size ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractDelimiter >> type [ ^ self class type ] diff --git a/src/Microdown/MicAbstractMicrodownTextualBuilder.class.st b/src/Microdown/MicAbstractMicrodownTextualBuilder.class.st index b4257d3a..23dadc25 100644 --- a/src/Microdown/MicAbstractMicrodownTextualBuilder.class.st +++ b/src/Microdown/MicAbstractMicrodownTextualBuilder.class.st @@ -3,8 +3,8 @@ I'm a copy of Pillar textual canvas. I should be fusioned in my subclass. We should revisit the API because parsing lines is a not really good design. " Class { - #name : #MicAbstractMicrodownTextualBuilder, - #superclass : #Object, + #name : 'MicAbstractMicrodownTextualBuilder', + #superclass : 'Object', #instVars : [ 'stream', 'lastIsNewLine', @@ -13,33 +13,35 @@ Class { #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Parser' + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicAbstractMicrodownTextualBuilder class >> on: aStream [ ^ self new setStream: aStream; yourself ] -{ #category : #formatting } +{ #category : 'formatting' } MicAbstractMicrodownTextualBuilder >> bold: aText [ self writeText: aText surroundBy: BoldMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAbstractMicrodownTextualBuilder >> contents [ ^ stream contents ] -{ #category : #initialization } +{ #category : 'initialization' } MicAbstractMicrodownTextualBuilder >> flush [ stream flush ] -{ #category : #initialization } +{ #category : 'initialization' } MicAbstractMicrodownTextualBuilder >> initialize [ super initialize. stream := (String new: 1000) writeStream. @@ -47,86 +49,86 @@ MicAbstractMicrodownTextualBuilder >> initialize [ lastIsNewLine := true ] -{ #category : #formatting } +{ #category : 'formatting' } MicAbstractMicrodownTextualBuilder >> italic: aText [ self writeText: aText surroundBy: ItalicMarkup ] -{ #category : #testing } +{ #category : 'testing' } MicAbstractMicrodownTextualBuilder >> lastIsNewLine [ ^ lastIsNewLine ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicAbstractMicrodownTextualBuilder >> line: aString [ self nextPutAll: aString; newLine ] -{ #category : #formatting } +{ #category : 'formatting' } MicAbstractMicrodownTextualBuilder >> monospace: aText [ self writeText: aText surroundBy: MonospaceMarkup ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicAbstractMicrodownTextualBuilder >> newLine [ self raw: newLineCharacterString. lastIsNewLine := true ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicAbstractMicrodownTextualBuilder >> nextPut: aCharacter [ stream nextPut: aCharacter. lastIsNewLine := false ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicAbstractMicrodownTextualBuilder >> nextPutAll: aString [ aString do: [ :char | self nextPut: char ] ] -{ #category : #'writing low-level' } +{ #category : 'writing low-level' } MicAbstractMicrodownTextualBuilder >> potentialNewLine [ lastIsNewLine ifFalse: [ self newLine ] ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicAbstractMicrodownTextualBuilder >> raw: aString [ stream << aString ] -{ #category : #initialization } +{ #category : 'initialization' } MicAbstractMicrodownTextualBuilder >> setNewLineCharacterString: aLine [ newLineCharacterString := aLine ] -{ #category : #initialization } +{ #category : 'initialization' } MicAbstractMicrodownTextualBuilder >> setStream: aStream [ stream := aStream ] -{ #category : #'writing text' } +{ #category : 'writing text' } MicAbstractMicrodownTextualBuilder >> space [ stream space ] -{ #category : #formatting } +{ #category : 'formatting' } MicAbstractMicrodownTextualBuilder >> strike: aText [ self writeText: aText surroundBy: StrikeMarkup ] -{ #category : #writing } +{ #category : 'writing' } MicAbstractMicrodownTextualBuilder >> text: aText [ self raw: aText ] -{ #category : #writing } +{ #category : 'writing' } MicAbstractMicrodownTextualBuilder >> writeDuring: aBlock surroundBy: anOpenerMarkup and: aCloserMarkup [ self raw: anOpenerMarkup. @@ -134,7 +136,7 @@ MicAbstractMicrodownTextualBuilder >> writeDuring: aBlock surroundBy: anOpenerMa self raw: aCloserMarkup ] -{ #category : #writing } +{ #category : 'writing' } MicAbstractMicrodownTextualBuilder >> writeLinkDuring: aBlockClosure destination: aString [ self @@ -143,7 +145,7 @@ MicAbstractMicrodownTextualBuilder >> writeLinkDuring: aBlockClosure destination title: nil ] -{ #category : #writing } +{ #category : 'writing' } MicAbstractMicrodownTextualBuilder >> writeLinkDuring: aBlockClosure destination: aDestination title: aTitle [ self raw: '['. @@ -162,13 +164,13 @@ MicAbstractMicrodownTextualBuilder >> writeLinkDuring: aBlockClosure destination ] ] -{ #category : #writing } +{ #category : 'writing' } MicAbstractMicrodownTextualBuilder >> writeNewLine [ self raw: String cr ] -{ #category : #writing } +{ #category : 'writing' } MicAbstractMicrodownTextualBuilder >> writeText: aText beginsWith: aMarkup [ self raw: aMarkup; @@ -176,12 +178,12 @@ MicAbstractMicrodownTextualBuilder >> writeText: aText beginsWith: aMarkup [ raw: aText ] -{ #category : #writing } +{ #category : 'writing' } MicAbstractMicrodownTextualBuilder >> writeText: aText surroundBy: aMarkup [ self writeText: aText surroundBy: aMarkup and: aMarkup ] -{ #category : #writing } +{ #category : 'writing' } MicAbstractMicrodownTextualBuilder >> writeText: aText surroundBy: anOpenerMarkup and: aCloserMarkup [ self raw: anOpenerMarkup; diff --git a/src/Microdown/MicAnchorBlock.class.st b/src/Microdown/MicAnchorBlock.class.st index 6766741c..fc68b98f 100644 --- a/src/Microdown/MicAnchorBlock.class.st +++ b/src/Microdown/MicAnchorBlock.class.st @@ -7,21 +7,23 @@ I'm block that represents an anchor to a section. This way text can refer to the ``` " Class { - #name : #MicAnchorBlock, - #superclass : #MicSingleLineBlock, + #name : 'MicAnchorBlock', + #superclass : 'MicSingleLineBlock', #instVars : [ 'label', 'target' ], - #category : #'Microdown-Model' + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #visiting } +{ #category : 'visiting' } MicAnchorBlock >> accept: aVisitor [ ^ aVisitor visitAnchor: self ] -{ #category : #public } +{ #category : 'public' } MicAnchorBlock >> addLineAndReturnNextNode: line [ "# bla @myanchor @@ -30,28 +32,28 @@ MicAnchorBlock >> addLineAndReturnNextNode: line [ ^ self ] -{ #category : #testing } +{ #category : 'testing' } MicAnchorBlock >> hasLabel [ label ifNil: [ ^ false ]. ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorBlock >> label [ ^ label ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorBlock >> label: anObject [ label := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorBlock >> target [ ^ target ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorBlock >> target: aMicHeaderBlock [ target := aMicHeaderBlock ] diff --git a/src/Microdown/MicAnchorLinker.class.st b/src/Microdown/MicAnchorLinker.class.st index cd1e6796..f3a43f38 100644 --- a/src/Microdown/MicAnchorLinker.class.st +++ b/src/Microdown/MicAnchorLinker.class.st @@ -11,12 +11,14 @@ I'm usually invoked in a post parsing phase, so transparent to the user. " Class { - #name : #MicAnchorLinker, - #superclass : #MicrodownVisitor, - #category : #'Microdown-Visitor' + #name : 'MicAnchorLinker', + #superclass : 'MicrodownVisitor', + #category : 'Microdown-Visitor', + #package : 'Microdown', + #tag : 'Visitor' } -{ #category : #visiting } +{ #category : 'visiting' } MicAnchorLinker >> visitHeader: aHeader [ | siblings position potentialAnchor | diff --git a/src/Microdown/MicAnchorReferenceBlock.class.st b/src/Microdown/MicAnchorReferenceBlock.class.st index 2cdca417..e23d36f1 100644 --- a/src/Microdown/MicAnchorReferenceBlock.class.st +++ b/src/Microdown/MicAnchorReferenceBlock.class.st @@ -7,53 +7,55 @@ See *@fig1@* " Class { - #name : #MicAnchorReferenceBlock, - #superclass : #MicInlineElement, + #name : 'MicAnchorReferenceBlock', + #superclass : 'MicInlineElement', #instVars : [ 'reference' ], - #category : #'Microdown-ModelInline' + #category : 'Microdown-ModelInline', + #package : 'Microdown', + #tag : 'ModelInline' } -{ #category : #testing } +{ #category : 'testing' } MicAnchorReferenceBlock class >> isEvaluated [ ^ false ] -{ #category : #visiting } +{ #category : 'visiting' } MicAnchorReferenceBlock >> accept: aVisitor [ ^ aVisitor visitAnchorReference: self ] -{ #category : #visiting } +{ #category : 'visiting' } MicAnchorReferenceBlock >> closingDelimiter [ ^ AnchorReferenceCloserMarkup ] -{ #category : #initialization } +{ #category : 'initialization' } MicAnchorReferenceBlock >> kind [ ^ #anchorReference ] -{ #category : #visiting } +{ #category : 'visiting' } MicAnchorReferenceBlock >> openingDelimiter [ ^ AnchorReferenceOpenerMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceBlock >> reference [ ^ reference ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceBlock >> reference: aReference [ reference := aReference ] -{ #category : #visiting } +{ #category : 'visiting' } MicAnchorReferenceBlock >> referenceAsHTML [ | ref | self flag: #todo. diff --git a/src/Microdown/MicAnchorReferenceCloserDelimiter.class.st b/src/Microdown/MicAnchorReferenceCloserDelimiter.class.st index c6f3a332..60b82e33 100644 --- a/src/Microdown/MicAnchorReferenceCloserDelimiter.class.st +++ b/src/Microdown/MicAnchorReferenceCloserDelimiter.class.st @@ -6,32 +6,34 @@ See *@fig1@* ``` " Class { - #name : #MicAnchorReferenceCloserDelimiter, - #superclass : #MicAbstractDelimiter, - #category : #'Microdown-Parser' + #name : 'MicAnchorReferenceCloserDelimiter', + #superclass : 'MicAbstractDelimiter', + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceCloserDelimiter class >> associatedInlineBlock [ ^ MicAnchorReferenceBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceCloserDelimiter class >> isCloser [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceCloserDelimiter class >> isOpener [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceCloserDelimiter class >> markup [ ^ AnchorReferenceCloserMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceCloserDelimiter class >> type [ ^ #anchorReference ] diff --git a/src/Microdown/MicAnchorReferenceOpenerDelimiter.class.st b/src/Microdown/MicAnchorReferenceOpenerDelimiter.class.st index 1dff8e36..2d37e203 100644 --- a/src/Microdown/MicAnchorReferenceOpenerDelimiter.class.st +++ b/src/Microdown/MicAnchorReferenceOpenerDelimiter.class.st @@ -6,32 +6,34 @@ See *@fig1@* ``` " Class { - #name : #MicAnchorReferenceOpenerDelimiter, - #superclass : #MicAbstractDelimiter, - #category : #'Microdown-Parser' + #name : 'MicAnchorReferenceOpenerDelimiter', + #superclass : 'MicAbstractDelimiter', + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceOpenerDelimiter class >> associatedInlineBlock [ ^ MicAnchorReferenceBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceOpenerDelimiter class >> isCloser [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceOpenerDelimiter class >> isOpener [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceOpenerDelimiter class >> markup [ ^ AnchorReferenceOpenerMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceOpenerDelimiter class >> type [ ^ #anchorReference ] diff --git a/src/Microdown/MicAnnotatedBlock.class.st b/src/Microdown/MicAnnotatedBlock.class.st index 47f55cd2..557d34ac 100644 --- a/src/Microdown/MicAnnotatedBlock.class.st +++ b/src/Microdown/MicAnnotatedBlock.class.st @@ -12,35 +12,37 @@ See [https://github.com/pillar-markup/MicroDown/issues/54](https://github.com/pi " Class { - #name : #MicAnnotatedBlock, - #superclass : #MicAbstractAnnotatedBlock, - #category : #'Microdown-Model' + #name : 'MicAnnotatedBlock', + #superclass : 'MicAbstractAnnotatedBlock', + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #visiting } +{ #category : 'visiting' } MicAnnotatedBlock >> accept: aVisitor [ ^ aVisitor visitAnnotated: self ] -{ #category : #'parse support' } +{ #category : 'parse support' } MicAnnotatedBlock >> closeMe [ super closeMe. body := self inlineParse: body ] -{ #category : #testing } +{ #category : 'testing' } MicAnnotatedBlock >> lineMarkup [ ^ AnnotatedParagraphMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotatedBlock >> text [ ^ String streamContents: [ :s | self textElements do: [ :each | s nextPutAll: each substring ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotatedBlock >> textElements [ ^ self body diff --git a/src/Microdown/MicAnnotationBlock.class.st b/src/Microdown/MicAnnotationBlock.class.st index 9d892fec..8eb68838 100644 --- a/src/Microdown/MicAnnotationBlock.class.st +++ b/src/Microdown/MicAnnotationBlock.class.st @@ -12,15 +12,17 @@ MicroDownParser parse: '{!citation|name=Duca99a!}' ``` " Class { - #name : #MicAnnotationBlock, - #superclass : #MicInlineElement, + #name : 'MicAnnotationBlock', + #superclass : 'MicInlineElement', #instVars : [ 'arguments' ], - #category : #'Microdown-ModelInline' + #category : 'Microdown-ModelInline', + #package : 'Microdown', + #tag : 'ModelInline' } -{ #category : #documentation } +{ #category : 'documentation' } MicAnnotationBlock class >> addDocumentDefinedAnnotations: aBuilder [ | currentDefinedTags | currentDefinedTags := self allSubclasses collect: [ :subclass | subclass tag -> subclass name]. @@ -38,14 +40,14 @@ MicAnnotationBlock class >> addDocumentDefinedAnnotations: aBuilder [ ] ] -{ #category : #documentation } +{ #category : 'documentation' } MicAnnotationBlock class >> buildMicroDownUsing: aBuilder withComment: aString [ super buildMicroDownUsing: aBuilder withComment: aString. self addDocumentDefinedAnnotations: aBuilder ] -{ #category : #constructor } +{ #category : 'constructor' } MicAnnotationBlock class >> from: aStartInteger to: anEndInteger withSubstring: aString withChildren: aChildren [ | splitter tag extensionClass | @@ -68,56 +70,56 @@ MicAnnotationBlock class >> from: aStartInteger to: anEndInteger withSubstring: yourself ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock class >> tag [ ^ #empty ] -{ #category : #visiting } +{ #category : 'visiting' } MicAnnotationBlock >> accept: aVisitor [ ^ aVisitor visitAnnotation: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> arguments [ ^ arguments ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> arguments: anArguments [ arguments := anArguments ] -{ #category : #visiting } +{ #category : 'visiting' } MicAnnotationBlock >> closeMe [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> closingDelimiter [ ^ AnnotationCloserMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> kind [ ^ #annotation ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> name [ ^ arguments defaultValue ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> openingDelimiter [ ^ AnnotationOpenerMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> printOn: aStream [ aStream nextPutAll: self openingDelimiter. diff --git a/src/Microdown/MicAnnotationCloserDelimiter.class.st b/src/Microdown/MicAnnotationCloserDelimiter.class.st index d535b42d..739dc685 100644 --- a/src/Microdown/MicAnnotationCloserDelimiter.class.st +++ b/src/Microdown/MicAnnotationCloserDelimiter.class.st @@ -6,33 +6,35 @@ See *@fig1* ``` " Class { - #name : #MicAnnotationCloserDelimiter, - #superclass : #MicAbstractDelimiter, - #category : #'Microdown-Parser' + #name : 'MicAnnotationCloserDelimiter', + #superclass : 'MicAbstractDelimiter', + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationCloserDelimiter class >> associatedInlineBlock [ ^ MicAnnotationBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationCloserDelimiter class >> isCloser [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationCloserDelimiter class >> isOpener [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationCloserDelimiter class >> markup [ ^ AnnotationCloserMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationCloserDelimiter class >> type [ ^ #annotation ] diff --git a/src/Microdown/MicAnnotationOpenerDelimiter.class.st b/src/Microdown/MicAnnotationOpenerDelimiter.class.st index 73ad5381..a54acd33 100644 --- a/src/Microdown/MicAnnotationOpenerDelimiter.class.st +++ b/src/Microdown/MicAnnotationOpenerDelimiter.class.st @@ -1,31 +1,33 @@ Class { - #name : #MicAnnotationOpenerDelimiter, - #superclass : #MicAbstractDelimiter, - #category : #'Microdown-Parser' + #name : 'MicAnnotationOpenerDelimiter', + #superclass : 'MicAbstractDelimiter', + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationOpenerDelimiter class >> associatedInlineBlock [ ^ MicAnnotationBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationOpenerDelimiter class >> isCloser [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationOpenerDelimiter class >> isOpener [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationOpenerDelimiter class >> markup [ ^ AnnotationOpenerMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationOpenerDelimiter class >> type [ ^ #annotation ] diff --git a/src/Microdown/MicArgumentList.class.st b/src/Microdown/MicArgumentList.class.st index 7f94a8f8..e996e96d 100644 --- a/src/Microdown/MicArgumentList.class.st +++ b/src/Microdown/MicArgumentList.class.st @@ -9,23 +9,25 @@ My syntax is of the following form: - `value|key=arg[&key=arg]*` defaultArg->value, and arguments. " Class { - #name : #MicArgumentList, - #superclass : #OrderedDictionary, + #name : 'MicArgumentList', + #superclass : 'OrderedDictionary', #instVars : [ 'defaultArg', 'initialValue' ], - #category : #'Microdown-Parser' + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicArgumentList class >> split: aString [ ^ self new from: aString; yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicArgumentList class >> split: aString defaultArg: defArg [ ^ self new defaultArg: defArg; @@ -33,7 +35,7 @@ MicArgumentList class >> split: aString defaultArg: defArg [ yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicArgumentList class >> split: aString defaultArg: defArg defaultValue: defValue [ ^ self new defaultArg: defArg; @@ -43,34 +45,34 @@ MicArgumentList class >> split: aString defaultArg: defArg defaultValue: defValu yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicArgumentList class >> withStream: aStream [ ^ self split: aStream contents. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicArgumentList class >> withString: aString [ ^ self split: aString ] -{ #category : #accessing } +{ #category : 'accessing' } MicArgumentList >> defaultArg [ ^ defaultArg ifNil: [ defaultArg := #defaultArg ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicArgumentList >> defaultArg: anObject [ defaultArg := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicArgumentList >> defaultValue [ ^ self at: defaultArg ifAbsent: [ initialValue ] ] -{ #category : #initialization } +{ #category : 'initialization' } MicArgumentList >> from: fullString [ "I am the 'parser' of the argument splitter" | barSplit | @@ -84,33 +86,33 @@ MicArgumentList >> from: fullString [ ] -{ #category : #testing } +{ #category : 'testing' } MicArgumentList >> hasNonDefaultArguments [ "has changed #defaultArg or has other keys" ^ self hasNonDefaultValue or: [ (self keys copyWithout: self defaultArg ) notEmpty ] ] -{ #category : #testing } +{ #category : 'testing' } MicArgumentList >> hasNonDefaultValue [ "return true if the default arg was given a value" ^ self defaultValue notNil and: [ self defaultValue ~= initialValue ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicArgumentList >> initialValue: anObject [ initialValue := anObject ] -{ #category : #copying } +{ #category : 'copying' } MicArgumentList >> justTheArguments [ ^ self copy removeKey: defaultArg ifAbsent: [ ]; yourself ] -{ #category : #printing } +{ #category : 'printing' } MicArgumentList >> printOn: aStream [ |argKeys| self hasNonDefaultValue @@ -122,12 +124,12 @@ MicArgumentList >> printOn: aStream [ aStream nextPutAll: ((argKeys collect: [:k| k,'=',(self at:k)]) joinUsing: '&') ] -{ #category : #printing } +{ #category : 'printing' } MicArgumentList >> printString [ ^ String streamContents: [ :stream | self printOn: stream ] ] -{ #category : #parsing } +{ #category : 'parsing' } MicArgumentList >> setDefaultAndArguments: barSplit [ "barSplit is two strings, first assumed to be just a value, second to be arguments" |value| @@ -136,7 +138,7 @@ MicArgumentList >> setDefaultAndArguments: barSplit [ self setNoDefaultButArguments: barSplit second ] -{ #category : #parsing } +{ #category : 'parsing' } MicArgumentList >> setDefaultNoArguments: fullString [ "fullstring is just a name (containing no arguments) It is interpreted as both a name, and as an argument with no value" @@ -145,7 +147,7 @@ MicArgumentList >> setDefaultNoArguments: fullString [ self at: self defaultArg put: value ] -{ #category : #parsing } +{ #category : 'parsing' } MicArgumentList >> setNoDefaultButArguments: string [ "string is assumed to be on the form key=value&key=value" | pairs | @@ -156,7 +158,7 @@ MicArgumentList >> setNoDefaultButArguments: string [ ] -{ #category : #copying } +{ #category : 'copying' } MicArgumentList >> withoutDefaultValue [ "remove the defaultArg if no new value was assigned to it" ^ self hasNonDefaultValue diff --git a/src/Microdown/MicBoldDelimiter.class.st b/src/Microdown/MicBoldDelimiter.class.st index ba227ed9..61248abd 100644 --- a/src/Microdown/MicBoldDelimiter.class.st +++ b/src/Microdown/MicBoldDelimiter.class.st @@ -2,32 +2,34 @@ I am the delimiter for bold/strong format. " Class { - #name : #MicBoldDelimiter, - #superclass : #MicAbstractDelimiter, - #category : #'Microdown-Parser' + #name : 'MicBoldDelimiter', + #superclass : 'MicAbstractDelimiter', + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicBoldDelimiter class >> associatedInlineBlock [ ^ MicBoldFormatBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicBoldDelimiter class >> isCloser [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicBoldDelimiter class >> isOpener [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicBoldDelimiter class >> markup [ ^ BoldMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicBoldDelimiter class >> type [ ^ #bold ] diff --git a/src/Microdown/MicBoldFormatBlock.class.st b/src/Microdown/MicBoldFormatBlock.class.st index b11c9339..d9a7e25a 100644 --- a/src/Microdown/MicBoldFormatBlock.class.st +++ b/src/Microdown/MicBoldFormatBlock.class.st @@ -2,28 +2,30 @@ I represent a bold text section. I'm delimited using `**` as in `**bold**` to obtain **bold**. " Class { - #name : #MicBoldFormatBlock, - #superclass : #MicFormatBlock, - #category : #'Microdown-ModelInline' + #name : 'MicBoldFormatBlock', + #superclass : 'MicFormatBlock', + #category : 'Microdown-ModelInline', + #package : 'Microdown', + #tag : 'ModelInline' } -{ #category : #utilities } +{ #category : 'utilities' } MicBoldFormatBlock >> accept: aVisitor [ ^ aVisitor visitBold: self ] -{ #category : #utilities } +{ #category : 'utilities' } MicBoldFormatBlock >> closingDelimiter [ ^ BoldMarkup ] -{ #category : #utilities } +{ #category : 'utilities' } MicBoldFormatBlock >> kind [ ^ #bold ] -{ #category : #utilities } +{ #category : 'utilities' } MicBoldFormatBlock >> openingDelimiter [ ^ BoldMarkup diff --git a/src/Microdown/MicCitationBlock.class.st b/src/Microdown/MicCitationBlock.class.st index 90640f6d..e17e9fb3 100644 --- a/src/Microdown/MicCitationBlock.class.st +++ b/src/Microdown/MicCitationBlock.class.st @@ -8,23 +8,25 @@ this is a text with a {!citation|ref=Duca99a!} " Class { - #name : #MicCitationBlock, - #superclass : #MicAnnotationBlock, - #category : #'Microdown-Extensions' + #name : 'MicCitationBlock', + #superclass : 'MicAnnotationBlock', + #category : 'Microdown-Extensions', + #package : 'Microdown', + #tag : 'Extensions' } -{ #category : #accessing } +{ #category : 'accessing' } MicCitationBlock class >> tag [ ^ #citation ] -{ #category : #visiting } +{ #category : 'visiting' } MicCitationBlock >> accept: aVisitor [ aVisitor visitCitation: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicCitationBlock >> ref [ ^ arguments at: 'ref' ifAbsent: [ '' ] ] diff --git a/src/Microdown/MicCodeBlock.class.st b/src/Microdown/MicCodeBlock.class.st index 4ae50072..b4a65e0c 100644 --- a/src/Microdown/MicCodeBlock.class.st +++ b/src/Microdown/MicCodeBlock.class.st @@ -36,17 +36,19 @@ The current implementation stores lines in a single text and this is a bad idea Second if we want to treat lines separatedly we have to reparse it. Now we do not need it so this is good but this is just by chance! " Class { - #name : #MicCodeBlock, - #superclass : #MicAbstractCodeBlock, - #category : #'Microdown-Model' + #name : 'MicCodeBlock', + #superclass : 'MicAbstractCodeBlock', + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #visiting } +{ #category : 'visiting' } MicCodeBlock >> accept: aVisitor [ ^ aVisitor visitCode: self ] -{ #category : #public } +{ #category : 'public' } MicCodeBlock >> closeMe [ "adjust prefix tabs based on first line I am allowing the codeblock itself to be indented in the input, see motivation in Microdown issue: 543" @@ -59,12 +61,12 @@ MicCodeBlock >> closeMe [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicCodeBlock >> code [ ^ self body ] -{ #category : #handle } +{ #category : 'handle' } MicCodeBlock >> extractFirstLineFrom: aLine [ "language=Pharo&label=fig1&caption=La vie est belle" "The first tag is language. @@ -79,50 +81,50 @@ MicCodeBlock >> extractFirstLineFrom: aLine [ ^ lineWithoutMarkup ] -{ #category : #testing } +{ #category : 'testing' } MicCodeBlock >> hasBody [ ^ body isNotEmpty ] -{ #category : #accessing } +{ #category : 'accessing' } MicCodeBlock >> hasLabel [ ^ arguments includesKey: #label ] -{ #category : #testing } +{ #category : 'testing' } MicCodeBlock >> hasNonDefaultArguments [ ^ arguments hasNonDefaultArguments ] -{ #category : #accessing } +{ #category : 'accessing' } MicCodeBlock >> hasNonDefaultLanguage [ "is the language defined explicitly" ^ arguments hasNonDefaultValue ] -{ #category : #initialization } +{ #category : 'initialization' } MicCodeBlock >> initialize [ super initialize. arguments := OrderedDictionary new. ] -{ #category : #accessing } +{ #category : 'accessing' } MicCodeBlock >> label [ "precondition: receiver hasLabel" ^ arguments at: #label ] -{ #category : #accessing } +{ #category : 'accessing' } MicCodeBlock >> label: aString [ self arguments at: #label put: aString ] -{ #category : #accessing } +{ #category : 'accessing' } MicCodeBlock >> size [ "precondition: receiver hasLabel" diff --git a/src/Microdown/MicColumnBlock.class.st b/src/Microdown/MicColumnBlock.class.st index fadd6bfd..364d87fc 100644 --- a/src/Microdown/MicColumnBlock.class.st +++ b/src/Microdown/MicColumnBlock.class.st @@ -12,27 +12,29 @@ I'm a bloc element that represents a column. I have one optional argument that i ``` " Class { - #name : #MicColumnBlock, - #superclass : #MicEnvironmentBlock, - #category : #'Microdown-Extensions' + #name : 'MicColumnBlock', + #superclass : 'MicEnvironmentBlock', + #category : 'Microdown-Extensions', + #package : 'Microdown', + #tag : 'Extensions' } -{ #category : #accessing } +{ #category : 'accessing' } MicColumnBlock class >> tag [ ^ #column ] -{ #category : #accessing } +{ #category : 'accessing' } MicColumnBlock >> accept: aVisitor [ ^ aVisitor visitColumn: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicColumnBlock >> width [ ^ arguments at: #width ] -{ #category : #accessing } +{ #category : 'accessing' } MicColumnBlock >> width: anObject [ arguments at: #width put: anObject ] diff --git a/src/Microdown/MicColumnsBlock.class.st b/src/Microdown/MicColumnsBlock.class.st index c409da7f..dde952fd 100644 --- a/src/Microdown/MicColumnsBlock.class.st +++ b/src/Microdown/MicColumnsBlock.class.st @@ -33,17 +33,19 @@ Note that a column can have also a width. ``` " Class { - #name : #MicColumnsBlock, - #superclass : #MicEnvironmentBlock, - #category : #'Microdown-Extensions' + #name : 'MicColumnsBlock', + #superclass : 'MicEnvironmentBlock', + #category : 'Microdown-Extensions', + #package : 'Microdown', + #tag : 'Extensions' } -{ #category : #accessing } +{ #category : 'accessing' } MicColumnsBlock class >> tag [ ^ #columns ] -{ #category : #visiting } +{ #category : 'visiting' } MicColumnsBlock >> accept: aVisitor [ ^ aVisitor visitColumns: self ] diff --git a/src/Microdown/MicCommentBlock.class.st b/src/Microdown/MicCommentBlock.class.st index 2a172481..7f051091 100644 --- a/src/Microdown/MicCommentBlock.class.st +++ b/src/Microdown/MicCommentBlock.class.st @@ -6,17 +6,19 @@ Each line to be commented should start with %. I should be a subclass of SingleLineBlock and not continuousMarkedBlock. " Class { - #name : #MicCommentBlock, - #superclass : #MicContinuousMarkedBlock, - #category : #'Microdown-Model' + #name : 'MicCommentBlock', + #superclass : 'MicContinuousMarkedBlock', + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #visiting } +{ #category : 'visiting' } MicCommentBlock >> accept: aVisitor [ ^ aVisitor visitComment: self ] -{ #category : #markups } +{ #category : 'markups' } MicCommentBlock >> lineMarkup [ ^ CommentedLineMarkup diff --git a/src/Microdown/MicContinuousMarkedBlock.class.st b/src/Microdown/MicContinuousMarkedBlock.class.st index 892e8010..15259e33 100644 --- a/src/Microdown/MicContinuousMarkedBlock.class.st +++ b/src/Microdown/MicContinuousMarkedBlock.class.st @@ -30,15 +30,17 @@ produces " Class { - #name : #MicContinuousMarkedBlock, - #superclass : #MicAbstractBlock, + #name : 'MicContinuousMarkedBlock', + #superclass : 'MicAbstractBlock', #instVars : [ 'text' ], - #category : #'Microdown-Model' + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #actions } +{ #category : 'actions' } MicContinuousMarkedBlock >> addLineAndReturnNextNode: line [ "line is assumed to be of the form 'chararacters some text' e.g., '> some text' the prefix spaces after $> are removed" @@ -50,14 +52,14 @@ MicContinuousMarkedBlock >> addLineAndReturnNextNode: line [ ifNotNil: [ text , String cr , treatedLine ] ] -{ #category : #testing } +{ #category : 'testing' } MicContinuousMarkedBlock >> canConsumeLine: line [ "return if this block can consume line i.e., it starts with sensible characters, e.g., > " ^ self doesLineStartWithMarkup: line ] -{ #category : #testing } +{ #category : 'testing' } MicContinuousMarkedBlock >> doesLineStartWithMarkup: line [ "return if the line starts with a markup" @@ -65,23 +67,23 @@ MicContinuousMarkedBlock >> doesLineStartWithMarkup: line [ ] -{ #category : #actions } +{ #category : 'actions' } MicContinuousMarkedBlock >> extractLine: line [ ^ (line copyFrom: self lineMarkup size + 1 to: line size) trim ] -{ #category : #markups } +{ #category : 'markups' } MicContinuousMarkedBlock >> lineMarkup [ ^ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } MicContinuousMarkedBlock >> text [ ^ text ] -{ #category : #accessing } +{ #category : 'accessing' } MicContinuousMarkedBlock >> text: aString [ text := aString ] diff --git a/src/Microdown/MicDocumentListBlock.class.st b/src/Microdown/MicDocumentListBlock.class.st index c56dbf8d..6874482b 100644 --- a/src/Microdown/MicDocumentListBlock.class.st +++ b/src/Microdown/MicDocumentListBlock.class.st @@ -1,39 +1,41 @@ Class { - #name : #MicDocumentListBlock, - #superclass : #MicAnnotationBlock, - #category : #'Microdown-Extensions' + #name : 'MicDocumentListBlock', + #superclass : 'MicAnnotationBlock', + #category : 'Microdown-Extensions', + #package : 'Microdown', + #tag : 'Extensions' } -{ #category : #accessing } +{ #category : 'accessing' } MicDocumentListBlock class >> tag [ ^ #documentlist ] -{ #category : #visiting } +{ #category : 'visiting' } MicDocumentListBlock >> accept: aVisitor [ "^ aVisitor visitDocListAnnotation: self" ] -{ #category : #visiting } +{ #category : 'visiting' } MicDocumentListBlock >> limit [ ^ self arguments at: #limit ifAbsent: [ '3' ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicDocumentListBlock >> path [ ^ self arguments at: #path ] -{ #category : #visiting } +{ #category : 'visiting' } MicDocumentListBlock >> sort [ ^ self arguments at: #sort ifAbsent: [ '' ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicDocumentListBlock >> summaryMaxSize [ ^ self arguments at: #summaryMaxSize @@ -41,7 +43,7 @@ MicDocumentListBlock >> summaryMaxSize [ ifAbsent: [ 500 ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicDocumentListBlock >> templates [ ^ self arguments at: #templates ifAbsent: [ #() ] diff --git a/src/Microdown/MicElement.class.st b/src/Microdown/MicElement.class.st index 0c2c2440..78d11f90 100644 --- a/src/Microdown/MicElement.class.st +++ b/src/Microdown/MicElement.class.st @@ -1,6 +1,6 @@ Class { - #name : #MicElement, - #superclass : #Object, + #name : 'MicElement', + #superclass : 'Object', #instVars : [ 'parent', 'properties' @@ -8,10 +8,12 @@ Class { #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Model' + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #documentation } +{ #category : 'documentation' } MicElement class >> buildMicroDownUsing: aBuilder withComment: aComment [ | visitSelector visitors | super buildMicroDownUsing: aBuilder withComment: aComment. @@ -33,18 +35,18 @@ MicElement class >> buildMicroDownUsing: aBuilder withComment: aComment [ visitors do: [:class | aBuilder item: [ aBuilder monospace: (class name, '>>#', visitSelector ) ]]]] ] -{ #category : #utilities } +{ #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 ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicElement >> accept: aVisitor [ self subclassResponsibility ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> hasProperty: aKey [ "Answer whether there is a property named aKey." @@ -52,7 +54,7 @@ MicElement >> hasProperty: aKey [ ^ properties includesKey: aKey ] -{ #category : #public } +{ #category : 'public' } MicElement >> inlineParse: aString [ | inlineParser inlinedChildren | @@ -64,48 +66,48 @@ MicElement >> inlineParse: aString [ ] -{ #category : #private } +{ #category : 'private' } MicElement >> inlineParserClass [ ^ MicInlineParser ] -{ #category : #private } +{ #category : 'private' } MicElement >> newInlineParser [ ^ self inlineParserClass new ] -{ #category : #accessing } +{ #category : 'accessing' } MicElement >> parent [ ^ parent ] -{ #category : #accessing } +{ #category : 'accessing' } MicElement >> parent: aBlock [ parent := aBlock. aBlock addChild: self ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> properties [ ^ properties ifNil: [ properties := Dictionary new ] ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> propertiesCopy [ self properties ifNil: [ ^ nil ]. ^ self properties collect: [ :each | each copy ] ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> propertyAt: aKey [ "Answer the property value associated with aKey." ^ self propertyAt: aKey ifAbsent: [ MicPropertyError signal: 'Property not found' ] ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> propertyAt: aKey ifAbsent: aBlock [ "Answer the property value associated with aKey or, if aKey isn't found, answer the result of evaluating aBlock." @@ -114,28 +116,28 @@ MicElement >> propertyAt: aKey ifAbsent: aBlock [ ifFalse: [ self properties at: aKey ifAbsent: aBlock ] ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> propertyAt: aKey ifAbsentPut: aBlock [ "Answer the property associated with aKey or, if aKey isn't found store the result of evaluating aBlock as new value." ^ self propertyAt: aKey ifAbsent: [ self propertyAt: aKey put: aBlock value ] ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> propertyAt: aKey put: anObject [ "Set the property at aKey to be anObject. If aKey is not found, create a new entry for aKey and set is value to anObject. Answer anObject." ^ self properties at: aKey put: anObject ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> removeProperty: aKey [ "Remove the property with aKey. Answer the property or raise an error if aKey isn't found." ^ self removeProperty: aKey ifAbsent: [ MicPropertyError signal: 'Property not found' ] ] -{ #category : #properties } +{ #category : 'properties' } MicElement >> removeProperty: aKey ifAbsent: aBlock [ "Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock." @@ -146,7 +148,7 @@ MicElement >> removeProperty: aKey ifAbsent: aBlock [ ^ answer ] -{ #category : #public } +{ #category : 'public' } MicElement >> resolveFrom: aBase [ Microdown resolveDocument: self withBase: aBase ] diff --git a/src/Microdown/MicEnvironmentBlock.class.st b/src/Microdown/MicEnvironmentBlock.class.st index 5bf861f2..1cb64811 100644 --- a/src/Microdown/MicEnvironmentBlock.class.st +++ b/src/Microdown/MicEnvironmentBlock.class.st @@ -43,15 +43,17 @@ This is important to support better column in the future: " Class { - #name : #MicEnvironmentBlock, - #superclass : #MicStartStopMarkupBlock, + #name : 'MicEnvironmentBlock', + #superclass : 'MicStartStopMarkupBlock', #instVars : [ 'arguments' ], - #category : #'Microdown-Model' + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #documentation } +{ #category : 'documentation' } MicEnvironmentBlock class >> addDocumentDefinedEnvironments: aBuilder [ | currentDefinedTags | currentDefinedTags := self allSubclasses collect: [ :subclass | subclass tag -> subclass name]. @@ -68,7 +70,7 @@ MicEnvironmentBlock class >> addDocumentDefinedEnvironments: aBuilder [ ] ] -{ #category : #public } +{ #category : 'public' } MicEnvironmentBlock class >> alternateBlockClassFor: line [ "If there is one subclass with the corresponding tag, returns it, else resturn the current class." @@ -81,19 +83,19 @@ MicEnvironmentBlock class >> alternateBlockClassFor: line [ ^ self extensionClassFor: tag ] -{ #category : #documentation } +{ #category : 'documentation' } MicEnvironmentBlock class >> buildMicroDownUsing: aBuilder withComment: aString [ super buildMicroDownUsing: aBuilder withComment: aString. self addDocumentDefinedEnvironments: aBuilder ] -{ #category : #visiting } +{ #category : 'visiting' } MicEnvironmentBlock >> accept: aVisitor [ ^ aVisitor visitEnvironment: self ] -{ #category : #handle } +{ #category : 'handle' } MicEnvironmentBlock >> addLineAndReturnNextNode: line [ "add line to this node. Notice, the action is allowed to create new nodes in the block tree. @@ -111,25 +113,25 @@ MicEnvironmentBlock >> addLineAndReturnNextNode: line [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } MicEnvironmentBlock >> arguments [ ^ arguments ] -{ #category : #'parse support' } +{ #category : 'parse support' } MicEnvironmentBlock >> body [ ^ String streamContents: [:s | self bodyElements do: [ :each | s nextPutAll: each substring ] ] ] -{ #category : #'parse support' } +{ #category : 'parse support' } MicEnvironmentBlock >> bodyElements [ ^ children ] -{ #category : #'parse support' } +{ #category : 'parse support' } MicEnvironmentBlock >> bodyFromLine: line [ | newBlock | @@ -138,7 +140,7 @@ MicEnvironmentBlock >> bodyFromLine: line [ ^ newBlock ] -{ #category : #'parse support' } +{ #category : 'parse support' } MicEnvironmentBlock >> closeMe [ "this is a temporary solution because normally the parser should populate body with MicBlocks. @@ -153,12 +155,12 @@ MicEnvironmentBlock >> closeMe [ defaultValue: ''. ] -{ #category : #accessing } +{ #category : 'accessing' } MicEnvironmentBlock >> environmentName [ ^ arguments at: #environmentName ] -{ #category : #accessing } +{ #category : 'accessing' } MicEnvironmentBlock >> extractFirstLineFrom: aLine [ "we got foo bar or > extractFirstLineFrom: aLine [ ifFalse: [ firstLine ] ] -{ #category : #markups } +{ #category : 'markups' } MicEnvironmentBlock >> lineStartMarkup [ ^ EnvironmentOpeningBlockMarkup ] -{ #category : #markups } +{ #category : 'markups' } MicEnvironmentBlock >> lineStopMarkup [ ^ EnvironmentClosingBlockMarkup diff --git a/src/Microdown/MicFigureBlock.class.st b/src/Microdown/MicFigureBlock.class.st index 0367817e..c6e499b4 100644 --- a/src/Microdown/MicFigureBlock.class.st +++ b/src/Microdown/MicFigureBlock.class.st @@ -11,34 +11,36 @@ I have a resources, i.e. an object referencing either a file (in relative or abs What is important to see is that there is a space between the url arguments and microdown arguments. " Class { - #name : #MicFigureBlock, - #superclass : #MicInlineBlockWithUrl, - #category : #'Microdown-ModelInline' + #name : 'MicFigureBlock', + #superclass : 'MicInlineBlockWithUrl', + #category : 'Microdown-ModelInline', + #package : 'Microdown', + #tag : 'ModelInline' } -{ #category : #converting } +{ #category : 'converting' } MicFigureBlock >> accept: aVisitor [ ^ aVisitor visitFigure: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureBlock >> alt [ ^ self arguments at: #alt ifAbsent: [''] ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureBlock >> alt: aString [ self arguments at: #alt put: aString ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureBlock >> anchor [ ^ self arguments at: #anchor ifAbsent: [ nil ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicFigureBlock >> closeMe [ "the link url - ![alt text](url) - url is allowed to have title in quotes (url ""title"") " @@ -53,7 +55,7 @@ MicFigureBlock >> closeMe [ self children: captionElements ] -{ #category : #'to be removed' } +{ #category : 'to be removed' } MicFigureBlock >> figurePath [ "this is a hack waiting for the resolution of resource references" "when we have file://figures/foo.png we want to have figures/foo.png " @@ -65,50 +67,50 @@ MicFigureBlock >> figurePath [ ] -{ #category : #printing } +{ #category : 'printing' } MicFigureBlock >> fullName [ ^ reference fullName ] -{ #category : #testing } +{ #category : 'testing' } MicFigureBlock >> hasAnchor [ ^ self anchor isNotNil ] -{ #category : #testing } +{ #category : 'testing' } MicFigureBlock >> hasCaption [ ^ captionElements notNil ] -{ #category : #testing } +{ #category : 'testing' } MicFigureBlock >> hasChildren [ ^ self children notEmpty ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureBlock >> kind [ self flag: #todo. "remove me" ^ #figure ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureBlock >> openingDelimiter [ ^ FigureNameOpenerMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureBlock >> originUrl [ ^ self properties at: #originUrl ifAbsent: [ url ] ] -{ #category : #printing } +{ #category : 'printing' } MicFigureBlock >> printOn: aStream [ aStream nextPut: $!; nextPut: $[; diff --git a/src/Microdown/MicFigureNameOpenerDelimiter.class.st b/src/Microdown/MicFigureNameOpenerDelimiter.class.st index 8dca9a40..bd3bb3f1 100644 --- a/src/Microdown/MicFigureNameOpenerDelimiter.class.st +++ b/src/Microdown/MicFigureNameOpenerDelimiter.class.st @@ -2,17 +2,19 @@ I am the opener delimiter for figure name. " Class { - #name : #MicFigureNameOpenerDelimiter, - #superclass : #MicAbstractDelimiter, - #category : #'Microdown-Parser' + #name : 'MicFigureNameOpenerDelimiter', + #superclass : 'MicAbstractDelimiter', + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicFigureNameOpenerDelimiter class >> associatedInlineBlock [ ^ MicFigureBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureNameOpenerDelimiter class >> associatedTypes [ ^ { @@ -21,27 +23,27 @@ MicFigureNameOpenerDelimiter class >> associatedTypes [ } ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureNameOpenerDelimiter class >> isCloser [ ^ false ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureNameOpenerDelimiter class >> isOpener [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureNameOpenerDelimiter class >> markup [ ^ FigureNameOpenerMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureNameOpenerDelimiter class >> type [ ^ #figure ] -{ #category : #dispatching } +{ #category : 'dispatching' } MicFigureNameOpenerDelimiter >> addInlineBlock: anIndex to: inlineParser [ inlineParser linkOrFigureProcess: anIndex diff --git a/src/Microdown/MicFileResourceReference.class.st b/src/Microdown/MicFileResourceReference.class.st index 791fcac6..35b44f03 100644 --- a/src/Microdown/MicFileResourceReference.class.st +++ b/src/Microdown/MicFileResourceReference.class.st @@ -17,15 +17,17 @@ You can get an instance of me from a pharo `FileReference` using `MicFileResourc The test class `MicFileResourceTest` has two tests `testLoadImage` and `testLoadMicrodown` which show how to use me. " Class { - #name : #MicFileResourceReference, - #superclass : #MicAbsoluteResourceReference, + #name : 'MicFileResourceReference', + #superclass : 'MicAbsoluteResourceReference', #instVars : [ 'filesystem' ], - #category : #'Microdown-Core' + #category : 'Microdown-Core', + #package : 'Microdown', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicFileResourceReference class >> fromFileRef: aFileReference [ "return an instance of me which references aFileReference" | znUrl | @@ -37,12 +39,12 @@ MicFileResourceReference class >> fromFileRef: aFileReference [ filesystem: aFileReference fileSystem ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicFileResourceReference class >> handlesUriScheme: scheme [ ^ scheme = 'file' ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> binaryReadStream [ [^ self fileReference binaryReadStream] on: FileDoesNotExistException @@ -50,13 +52,13 @@ MicFileResourceReference >> binaryReadStream [ error resignalAs: (MicResourceReferenceError new messageText: 'Microdown file not found') ] ] -{ #category : #testing } +{ #category : 'testing' } MicFileResourceReference >> canSave [ "return true if I implement contents: " ^true ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> contents [ [^ self fileReference isDirectory ifTrue: [''] ifFalse: [self fileReference contents] ] on: FileDoesNotExistException @@ -64,7 +66,7 @@ MicFileResourceReference >> contents [ error resignalAs: (MicResourceReferenceError new messageText: 'Microdown file not found') ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> contents: aString [ "write the contents of a string to my file" |fileRef| @@ -73,44 +75,44 @@ MicFileResourceReference >> contents: aString [ self fileReference writeStreamDo: [ :stream | stream nextPutAll: aString ]. ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> fileReference [ ^ self filesystem referenceTo: self path ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> filesystem [ ^ filesystem ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> filesystem: anObject [ filesystem := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> fullName [ ^ self path ] -{ #category : #initialization } +{ #category : 'initialization' } MicFileResourceReference >> initialize [ super initialize. filesystem := FileSystem disk. ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> isDirectory [ ^ self fileReference isDirectory ] -{ #category : #testing } +{ #category : 'testing' } MicFileResourceReference >> isMicrodownResourceFileReference [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicFileResourceReference >> loadChildren [ "return a collection of MifResourceReferences if I am a directory, empty if I am not a directory" self isDirectory ifFalse: [ ^ #() ]. diff --git a/src/Microdown/MicFootnoteBlock.class.st b/src/Microdown/MicFootnoteBlock.class.st index 037c454b..77d9ba96 100644 --- a/src/Microdown/MicFootnoteBlock.class.st +++ b/src/Microdown/MicFootnoteBlock.class.st @@ -4,23 +4,25 @@ I'm an inline element that represents a footnote as in LaTeX for example. The bi this is a text with a `{!footnote|note=Here is a nice footenote.!}` " Class { - #name : #MicFootnoteBlock, - #superclass : #MicAnnotationBlock, - #category : #'Microdown-Extensions' + #name : 'MicFootnoteBlock', + #superclass : 'MicAnnotationBlock', + #category : 'Microdown-Extensions', + #package : 'Microdown', + #tag : 'Extensions' } -{ #category : #accessing } +{ #category : 'accessing' } MicFootnoteBlock class >> tag [ ^ #footnote ] -{ #category : #visiting } +{ #category : 'visiting' } MicFootnoteBlock >> accept: aVisitor [ aVisitor visitFootnote: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicFootnoteBlock >> note [ arguments ifNotEmpty: [ ^ arguments at: #note ifAbsent: [ '' ] ] diff --git a/src/Microdown/MicFormatBlock.class.st b/src/Microdown/MicFormatBlock.class.st index 9276f465..d73a6f3f 100644 --- a/src/Microdown/MicFormatBlock.class.st +++ b/src/Microdown/MicFormatBlock.class.st @@ -1,10 +1,12 @@ Class { - #name : #MicFormatBlock, - #superclass : #MicInlineElement, - #category : #'Microdown-ModelInline' + #name : 'MicFormatBlock', + #superclass : 'MicInlineElement', + #category : 'Microdown-ModelInline', + #package : 'Microdown', + #tag : 'ModelInline' } -{ #category : #visiting } +{ #category : 'visiting' } MicFormatBlock >> closeMe [ | text | @@ -18,7 +20,7 @@ MicFormatBlock >> closeMe [ self children: { text } ] ] -{ #category : #printing } +{ #category : 'printing' } MicFormatBlock >> printOn: aStream [ self printWithoutConventions: aStream. @@ -28,33 +30,33 @@ MicFormatBlock >> printOn: aStream [ aStream nextPut: $) ] -{ #category : #accessing } +{ #category : 'accessing' } MicFormatBlock >> text [ ^ String streamContents: [:st | self wrappedElements do: [ :each | st nextPutAll: each text ]] ] -{ #category : #accessing } +{ #category : 'accessing' } MicFormatBlock >> textElement [ ^ children first ] -{ #category : #accessing } +{ #category : 'accessing' } MicFormatBlock >> textElement: aMicTextBlock [ children := { aMicTextBlock } ] -{ #category : #accessing } +{ #category : 'accessing' } MicFormatBlock >> textElements [ ^ children ] -{ #category : #accessing } +{ #category : 'accessing' } MicFormatBlock >> textElements: aCollection [ children := aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } MicFormatBlock >> wrappedElements [ ^ children ] diff --git a/src/Microdown/MicHTTPResourceReference.class.st b/src/Microdown/MicHTTPResourceReference.class.st index b09aa2a0..c53383bc 100644 --- a/src/Microdown/MicHTTPResourceReference.class.st +++ b/src/Microdown/MicHTTPResourceReference.class.st @@ -4,15 +4,17 @@ I am a http reference encapsulating a http uri (`http//host/path/to/some/file.md " Class { - #name : #MicHTTPResourceReference, - #superclass : #MicAbsoluteResourceReference, + #name : 'MicHTTPResourceReference', + #superclass : 'MicAbsoluteResourceReference', #classVars : [ 'ResourcesCache' ], - #category : #'Microdown-Core' + #category : 'Microdown-Core', + #package : 'Microdown', + #tag : 'Core' } -{ #category : #private } +{ #category : 'private' } MicHTTPResourceReference class >> bytesForUrl: url [ "I do the offline and isCachingResources logic In particular notice that #getBytesByHttp: throws an @@ -27,7 +29,7 @@ MicHTTPResourceReference class >> bytesForUrl: url [ ifFalse: [ ^ self getBytesByHttp: url ] ] -{ #category : #private } +{ #category : 'private' } MicHTTPResourceReference class >> getBytesByHttp: uri [ | client | [(client := ZnEasy client) @@ -41,12 +43,12 @@ MicHTTPResourceReference class >> getBytesByHttp: uri [ error resignalAs: (MicResourceReferenceError new messageText: 'Could not access ', uri printString) ]. ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicHTTPResourceReference class >> handlesUriScheme: scheme [ ^ scheme beginsWith: 'http' ] -{ #category : #'class initialization' } +{ #category : 'class initialization' } MicHTTPResourceReference class >> initialize [ "self initialize" @@ -54,36 +56,36 @@ MicHTTPResourceReference class >> initialize [ self resetResourcesCache ] -{ #category : #testing } +{ #category : 'testing' } MicHTTPResourceReference class >> isCachingResources [ ^ Microdown isCachingResources ] -{ #category : #testing } +{ #category : 'testing' } MicHTTPResourceReference class >> offline [ ^ Microdown offline ] -{ #category : #testing } +{ #category : 'testing' } MicHTTPResourceReference class >> resetResourcesCache [ ResourcesCache := nil ] -{ #category : #testing } +{ #category : 'testing' } MicHTTPResourceReference class >> resourcesCache [ ResourcesCache ifNil: [ ResourcesCache := LRUCache new ]. ^ ResourcesCache ] -{ #category : #streams } +{ #category : 'streams' } MicHTTPResourceReference >> binaryReadStream [ ^ (self class bytesForUrl: self uri) readStream ] -{ #category : #accessing } +{ #category : 'accessing' } MicHTTPResourceReference >> contents [ ^ (self class bytesForUrl: self uri) utf8Decoded. ] diff --git a/src/Microdown/MicHeaderBlock.class.st b/src/Microdown/MicHeaderBlock.class.st index fcb7ee1e..a009a017 100644 --- a/src/Microdown/MicHeaderBlock.class.st +++ b/src/Microdown/MicHeaderBlock.class.st @@ -23,20 +23,22 @@ produces " Class { - #name : #MicHeaderBlock, - #superclass : #MicSingleLineBlock, + #name : 'MicHeaderBlock', + #superclass : 'MicSingleLineBlock', #instVars : [ 'level' ], - #category : #'Microdown-Model' + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #visiting } +{ #category : 'visiting' } MicHeaderBlock >> accept: aVisitor [ ^ aVisitor visitHeader: self ] -{ #category : #public } +{ #category : 'public' } MicHeaderBlock >> addLineAndReturnNextNode: line [ "Line is on the form '#### my heading at forth level'" self level: ('(#+)' asRegex @@ -46,19 +48,19 @@ MicHeaderBlock >> addLineAndReturnNextNode: line [ ^ self ] -{ #category : #'parse support' } +{ #category : 'parse support' } MicHeaderBlock >> closeMe [ super closeMe. children := self inlineParse: children ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderBlock >> formattedCode [ ^super formattedCode , '[ ', self level printString, '/', self header, ' ]' ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderBlock >> header [ ^ String streamContents: [ :s | children do: [ :e | s nextPutAll: e substring ] ] @@ -66,26 +68,26 @@ MicHeaderBlock >> header [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderBlock >> headerElements [ ^ self children ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderBlock >> headerElements: aCollection [ children := aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderBlock >> level [ ^ level ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderBlock >> level: anInteger [ "(anInteger between: 1 and: 6) ifFalse: [ MicParsingError signal: 'header levels must be between 1 and 6' ]." level := anInteger beBetween: 1 and: 6 diff --git a/src/Microdown/MicHorizontalLineBlock.class.st b/src/Microdown/MicHorizontalLineBlock.class.st index bc9fb2d7..77b54353 100644 --- a/src/Microdown/MicHorizontalLineBlock.class.st +++ b/src/Microdown/MicHorizontalLineBlock.class.st @@ -4,12 +4,14 @@ I'm an horizontal line. I'm expressed by using a new line with `***` *** the rest of the line is ignored. " Class { - #name : #MicHorizontalLineBlock, - #superclass : #MicSingleLineBlock, - #category : #'Microdown-Model' + #name : 'MicHorizontalLineBlock', + #superclass : 'MicSingleLineBlock', + #category : 'Microdown-Model', + #package : 'Microdown', + #tag : 'Model' } -{ #category : #visiting } +{ #category : 'visiting' } MicHorizontalLineBlock >> accept: aVisitor [ ^ aVisitor visitHorizontalLine: self ] diff --git a/src/Microdown/MicInlineBlockWithUrl.class.st b/src/Microdown/MicInlineBlockWithUrl.class.st index 1da51a92..d7ab7bf2 100644 --- a/src/Microdown/MicInlineBlockWithUrl.class.st +++ b/src/Microdown/MicInlineBlockWithUrl.class.st @@ -8,8 +8,8 @@ My subclasses manage figures and links. ![Pharologo](https://files.pharo.org/media/logo/logo.png) " Class { - #name : #MicInlineBlockWithUrl, - #superclass : #MicInlineElement, + #name : 'MicInlineBlockWithUrl', + #superclass : 'MicInlineElement', #instVars : [ 'url', 'parser', @@ -17,10 +17,12 @@ Class { 'arguments', 'reference' ], - #category : #'Microdown-ModelInline' + #category : 'Microdown-ModelInline', + #package : 'Microdown', + #tag : 'ModelInline' } -{ #category : #private } +{ #category : 'private' } MicInlineBlockWithUrl class >> fileStringWithoutHostFile: aString [ | localFileIndicator | localFileIndicator := 'file://'. @@ -29,7 +31,7 @@ MicInlineBlockWithUrl class >> fileStringWithoutHostFile: aString [ ifFalse: [ aString ] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicInlineBlockWithUrl class >> from: aStartInteger to: anEndInteger withKind: aKind withSubstring: aString withChildren: aChildren withURL: aURL [ ^ self new start: aStartInteger; @@ -42,7 +44,7 @@ MicInlineBlockWithUrl class >> from: aStartInteger to: anEndInteger withKind: aK yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicInlineBlockWithUrl class >> from: aStartInteger to: anEndInteger withKind: aKind withSubstring: aString withChildren: aChildren withURL: aURL withParser: aParser [ ^ self new start: aStartInteger; @@ -56,18 +58,18 @@ MicInlineBlockWithUrl class >> from: aStartInteger to: anEndInteger withKind: aK yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } MicInlineBlockWithUrl class >> from: aStartInteger to: anEndInteger withKind: aKind withSubstring: aString withURL: aURL [ ^ (self from: aStartInteger to: anEndInteger withKind: aKind withSubstring: aString withChildren: Array empty withURL: aURL) ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> argumentAt: aKey [ ^ self arguments at: aKey ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> argumentAt: aKey ifPresent: aBlock [ "Lookup the given key in the receiver. If it is present, answer the value of evaluating the given block with the value associated with the key. Otherwise, answer self." @@ -76,73 +78,73 @@ MicInlineBlockWithUrl >> argumentAt: aKey ifPresent: aBlock [ ifPresent: aBlock ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> argumentAt: aKey put: anObject [ self arguments at: aKey put: anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> arguments [ ^ arguments ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> arguments: aDictionary [ arguments := aDictionary ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> caption [ ^ String streamContents: [:st | self captionElements do: [ :each | st nextPutAll: each text ] ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicInlineBlockWithUrl >> captionElements [ ^ captionElements ifNil: [ OrderedCollection new ] ] -{ #category : #visiting } +{ #category : 'visiting' } MicInlineBlockWithUrl >> captionElements: aCollection [ captionElements := aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> closingDelimiter [ ^ URLCloserMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> fileStringWithoutHostFile [ ^ self class fileStringWithoutHostFile: url asString ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> hasArguments [ "Answer if the receiver contain at least 1 argument" ^ arguments notEmpty ] -{ #category : #initialization } +{ #category : 'initialization' } MicInlineBlockWithUrl >> initialize [ super initialize. arguments := OrderedDictionary new ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> parser [ ^ parser ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> parser: aParser [ parser := aParser ] -{ #category : #printing } +{ #category : 'printing' } MicInlineBlockWithUrl >> printOn: aStream [ | contents | contents := children @@ -157,24 +159,24 @@ MicInlineBlockWithUrl >> printOn: aStream [ aStream nextPut: $) ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> reference [ ^ reference ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> reference: anObject [ reference := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> url [ ^ url ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> url: anURL [ url := anURL diff --git a/src/Microdown/MicInlineElement.class.st b/src/Microdown/MicInlineElement.class.st index 860b0fd1..d7e21678 100644 --- a/src/Microdown/MicInlineElement.class.st +++ b/src/Microdown/MicInlineElement.class.st @@ -10,23 +10,25 @@ I am characterized by: " Class { - #name : #MicInlineElement, - #superclass : #MicElement, + #name : 'MicInlineElement', + #superclass : 'MicElement', #instVars : [ 'start', 'end', 'children', 'substring' ], - #category : #'Microdown-ModelInline' + #category : 'Microdown-ModelInline', + #package : 'Microdown', + #tag : 'ModelInline' } -{ #category : #constructor } +{ #category : 'constructor' } MicInlineElement class >> from: aStartInteger to: anEndInteger withSubstring: aString [ ^ self from: aStartInteger to: anEndInteger withSubstring: aString withChildren: Array new ] -{ #category : #constructor } +{ #category : 'constructor' } MicInlineElement class >> from: aStartInteger to: anEndInteger withSubstring: aString withChildren: aChildren [ ^ self new start: aStartInteger; @@ -38,54 +40,54 @@ MicInlineElement class >> from: aStartInteger to: anEndInteger withSubstring: aS yourself. ] -{ #category : #testing } +{ #category : 'testing' } MicInlineElement class >> isEvaluated [ ^ true ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> children [ ^ children ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> children: anArray [ children := anArray ] -{ #category : #printing } +{ #category : 'printing' } MicInlineElement >> childrenPrintOn [ ^ (children asString allButFirst: 9) allButLast ] -{ #category : #operations } +{ #category : 'operations' } MicInlineElement >> cleanSubstring [ "remove all \ left by the MicInlineParser - and replace \\ with single \" self substring: (MicInlineParser escapeDecode: self substring ) ] -{ #category : #visiting } +{ #category : 'visiting' } MicInlineElement >> closeMe [ "Hook to perform post creation action. The name is the same as for blocks." ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> end [ ^ end ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> end: anInteger [ end := anInteger ] -{ #category : #operations } +{ #category : 'operations' } MicInlineElement >> escapeCharacter [ ^ '\' ] -{ #category : #initialization } +{ #category : 'initialization' } MicInlineElement >> initialize [ super initialize. @@ -93,40 +95,40 @@ MicInlineElement >> initialize [ ] -{ #category : #testing } +{ #category : 'testing' } MicInlineElement >> isOnlyChild [ ^ children isEmpty ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> kind [ "we are deprecating the state" ^ self error ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> literal [ ^ substring copyFrom: start to: end. ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> openingDelimiter [ self subclassResponsibility ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> openingDelimiterSize [ ^ self openingDelimiter size ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> parent: aParent [ parent := aParent ] -{ #category : #printing } +{ #category : 'printing' } MicInlineElement >> print: aString surroundedOn: aStream [ aStream @@ -136,7 +138,7 @@ MicInlineElement >> print: aString surroundedOn: aStream [ ] -{ #category : #printing } +{ #category : 'printing' } MicInlineElement >> printOn: aStream [ | contents | @@ -152,7 +154,7 @@ MicInlineElement >> printOn: aStream [ ] -{ #category : #printing } +{ #category : 'printing' } MicInlineElement >> printWithoutConventions: aStream [ "Remove Mic and Block from the class." @@ -160,27 +162,27 @@ MicInlineElement >> printWithoutConventions: aStream [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> start [ ^ start ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> start: anInteger [ start := anInteger ] -{ #category : #obsolete } +{ #category : 'obsolete' } MicInlineElement >> substring [ ^ substring ] -{ #category : #obsolete } +{ #category : 'obsolete' } MicInlineElement >> substring: aSubString [ substring := aSubString ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineElement >> text [ ^ substring ] diff --git a/src/Microdown/MicInlineParser.class.st b/src/Microdown/MicInlineParser.class.st index eae9baf3..b7de16d7 100644 --- a/src/Microdown/MicInlineParser.class.st +++ b/src/Microdown/MicInlineParser.class.st @@ -2,8 +2,8 @@ I'm a parser of block text. I'm responsible to generate text, annotation, format, link, url kind of objects. " Class { - #name : #MicInlineParser, - #superclass : #Object, + #name : 'MicInlineParser', + #superclass : 'Object', #instVars : [ 'openersStack', 'result', @@ -27,16 +27,18 @@ Class { #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-Parser' + #category : 'Microdown-Parser', + #package : 'Microdown', + #tag : 'Parser' } -{ #category : #accessing } +{ #category : 'accessing' } MicInlineParser class >> abstractDelimiterClass [ ^ MicAbstractDelimiter ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineParser class >> allDelimiters [ AllDelimiters ifNil: [ @@ -49,7 +51,7 @@ MicInlineParser class >> allDelimiters [ ^ AllDelimiters ] -{ #category : #'escape character' } +{ #category : 'escape character' } MicInlineParser class >> escapeDecode: aString [ "I convert all encoded chars back to their original (without the leading escape character)" "My sister method escapeEncode encodes into the format I decode from" @@ -68,7 +70,7 @@ MicInlineParser class >> escapeDecode: aString [ ] -{ #category : #'escape character' } +{ #category : 'escape character' } MicInlineParser class >> escapeEncode: aString [ "I convert all escaped characters (eg '\`' or '\\') into special characters which are not used in Microdown" "My sister method escapeDecode reverts back" @@ -86,7 +88,7 @@ MicInlineParser class >> escapeEncode: aString [ ] -{ #category : #'escape character' } +{ #category : 'escape character' } MicInlineParser class >> escapeReescape: aString except: keep [ "I convert all encoded back to escaped chars, except the characters in keep" "My sister method escapeEncode encodes into the format I decode from" @@ -106,20 +108,20 @@ MicInlineParser class >> escapeReescape: aString except: keep [ ] -{ #category : #'class initialization' } +{ #category : 'class initialization' } MicInlineParser class >> initialize [