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/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 fa39072e..52ef4608 100644 --- a/src/Microdown/MicAnchorReferenceBlock.class.st +++ b/src/Microdown/MicAnchorReferenceBlock.class.st @@ -7,38 +7,40 @@ See *@fig1@* " Class { - #name : #MicAnchorReferenceBlock, - #superclass : #MicUnEvaluatedBlock, + #name : 'MicAnchorReferenceBlock', + #superclass : 'MicUnEvaluatedBlock', #instVars : [ 'reference' ], - #category : #'Microdown-InlineParser' + #category : 'Microdown-InlineParser', + #package : 'Microdown', + #tag : 'InlineParser' } -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceBlock class >> closingDelimiter [ ^ AnchorReferenceCloserMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceBlock class >> openingDelimiter [ ^ AnchorReferenceOpenerMarkup ] -{ #category : #visiting } +{ #category : 'visiting' } MicAnchorReferenceBlock >> accept: aVisitor [ ^ aVisitor visitAnchorReference: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceBlock >> reference [ ^ reference ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnchorReferenceBlock >> reference: anObject [ reference := anObject diff --git a/src/Microdown/MicAnnotatedBlock.class.st b/src/Microdown/MicAnnotatedBlock.class.st index 33a259fb..0dcf5768 100644 --- a/src/Microdown/MicAnnotatedBlock.class.st +++ b/src/Microdown/MicAnnotatedBlock.class.st @@ -12,36 +12,38 @@ 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 bodystring ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotatedBlock >> textElements [ ^ self body diff --git a/src/Microdown/MicAnnotationBlock.class.st b/src/Microdown/MicAnnotationBlock.class.st index b9ce0ad3..234f28b0 100644 --- a/src/Microdown/MicAnnotationBlock.class.st +++ b/src/Microdown/MicAnnotationBlock.class.st @@ -12,27 +12,29 @@ MicroDownParser parse: '{!citation|name=Duca99a!}' ``` " Class { - #name : #MicAnnotationBlock, - #superclass : #MicUnEvaluatedBlock, + #name : 'MicAnnotationBlock', + #superclass : 'MicUnEvaluatedBlock', #instVars : [ 'arguments' ], - #category : #'Microdown-InlineParser' + #category : 'Microdown-InlineParser', + #package : 'Microdown', + #tag : 'InlineParser' } -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock class >> closingDelimiter [ ^ AnnotationCloserMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock class >> openingDelimiter [ ^ AnnotationOpenerMarkup ] -{ #category : #parsing } +{ #category : 'parsing' } MicAnnotationBlock class >> parse: delimiter stream: aTokenStream for: aParser [ | bodystring arguments tag extensionClass | bodystring := delimiter undelimitedSubstring. @@ -49,24 +51,24 @@ MicAnnotationBlock class >> parse: delimiter stream: aTokenStream for: aParser [ arguments: arguments ] -{ #category : #visiting } +{ #category : 'visiting' } MicAnnotationBlock >> accept: aVisitor [ ^ aVisitor visitAnnotation: self ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> arguments [ ^ arguments ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> arguments: argumentList [ arguments := argumentList ] -{ #category : #accessing } +{ #category : 'accessing' } MicAnnotationBlock >> name [ ^ arguments defaultValue ] 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/MicBoldFormatBlock.class.st b/src/Microdown/MicBoldFormatBlock.class.st index 009cf32d..ee689b00 100644 --- a/src/Microdown/MicBoldFormatBlock.class.st +++ b/src/Microdown/MicBoldFormatBlock.class.st @@ -2,24 +2,26 @@ I represent a bold text section. I'm delimited using `**` as in `**bold**` to obtain **bold**. " Class { - #name : #MicBoldFormatBlock, - #superclass : #MicEvaluatedBlock, - #category : #'Microdown-InlineParser' + #name : 'MicBoldFormatBlock', + #superclass : 'MicEvaluatedBlock', + #category : 'Microdown-InlineParser', + #package : 'Microdown', + #tag : 'InlineParser' } -{ #category : #accessing } +{ #category : 'accessing' } MicBoldFormatBlock class >> closingDelimiter [ ^ BoldMarkup ] -{ #category : #accessing } +{ #category : 'accessing' } MicBoldFormatBlock class >> openingDelimiter [ ^ BoldMarkup ] -{ #category : #visiting } +{ #category : 'visiting' } MicBoldFormatBlock >> accept: aVisitor [ ^ aVisitor visitBold: self ] 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/MicEvaluatedBlock.class.st b/src/Microdown/MicEvaluatedBlock.class.st index 7063c9e0..ada7d8cb 100644 --- a/src/Microdown/MicEvaluatedBlock.class.st +++ b/src/Microdown/MicEvaluatedBlock.class.st @@ -2,42 +2,44 @@ I represent blocks with sub structure. Typically italics inside bold " Class { - #name : #MicEvaluatedBlock, - #superclass : #MicInlineElement, + #name : 'MicEvaluatedBlock', + #superclass : 'MicInlineElement', #instVars : [ 'children' ], - #category : #'Microdown-InlineParser' + #category : 'Microdown-InlineParser', + #package : 'Microdown', + #tag : 'InlineParser' } -{ #category : #parsing } +{ #category : 'parsing' } MicEvaluatedBlock class >> blockName [ ^ (super blockName) "withoutSuffix: 'Format'" ] -{ #category : #parsing } +{ #category : 'parsing' } MicEvaluatedBlock class >> parse: token stream: aTokenStream for: aParser [ ^ aParser parseEvaluatedBlock: self token: token stream: aTokenStream ] -{ #category : #accessing } +{ #category : 'accessing' } MicEvaluatedBlock >> children [ ^ children ] -{ #category : #accessing } +{ #category : 'accessing' } MicEvaluatedBlock >> children: anObject [ children := anObject ] -{ #category : #printing } +{ #category : 'printing' } MicEvaluatedBlock >> plainText [ ^ (self children collect: #plainText) joinUsing: ' ' ] -{ #category : #printing } +{ #category : 'printing' } MicEvaluatedBlock >> printOn: stream [ stream << self blockName << '{ '. children do: [ :ch | ch printOn: stream. stream nextPut: Character space ]. @@ -45,21 +47,21 @@ MicEvaluatedBlock >> printOn: stream [ ] -{ #category : #accessing } +{ #category : 'accessing' } MicEvaluatedBlock >> textElement [ "Should only be used for tests" self deprecated: 'Just use children' transformWith: '`@rec textElement' -> '`@rec children first'. ^ children first ] -{ #category : #accessing } +{ #category : 'accessing' } MicEvaluatedBlock >> textElement: elem [ "Should only be used for tests" self deprecated: 'Just use children' transformWith: '`@rec textElement: `@arg' -> '`@rec children: {`@arg}'. ^ children := { elem } ] -{ #category : #accessing } +{ #category : 'accessing' } MicEvaluatedBlock >> wrappedElements [ self deprecated: 'Just use children' transformWith: '`@rec wrappedElements' -> '`@rec children'. ^ children diff --git a/src/Microdown/MicFigureBlock.class.st b/src/Microdown/MicFigureBlock.class.st index 8beaf3ab..dbc13f3f 100644 --- a/src/Microdown/MicFigureBlock.class.st +++ b/src/Microdown/MicFigureBlock.class.st @@ -11,29 +11,31 @@ 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-InlineParser' + #name : 'MicFigureBlock', + #superclass : 'MicInlineBlockWithUrl', + #category : 'Microdown-InlineParser', + #package : 'Microdown', + #tag : 'InlineParser' } -{ #category : #accessing } +{ #category : 'accessing' } MicFigureBlock class >> closingDelimiter [ ^ NameCloserUrlOpener ] -{ #category : #accessing } +{ #category : 'accessing' } MicFigureBlock class >> openingDelimiter [ ^ FigureNameOpenerMarkup ] -{ #category : #visiting } +{ #category : 'visiting' } MicFigureBlock >> accept: aVisitor [ ^ aVisitor visitFigure: self ] -{ #category : #printing } +{ #category : 'printing' } MicFigureBlock >> plainText [ ^ '![', ((self children collect: #plainText) joinUsing: ' '), '](', url ,')' ] 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/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 c64e815b..7966fd66 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,38 +48,38 @@ MicHeaderBlock >> addLineAndReturnNextNode: line [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderBlock >> formattedCode [ ^super formattedCode , '[ ', self level printString, '/', self header, ' ]' ] -{ #category : #accessing } +{ #category : 'accessing' } MicHeaderBlock >> header [ "I am used to get an adhoc string for the header" ^ String streamContents: [ :s | children do: [ :e | s nextPutAll: e bodystring ] ] ] -{ #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/MicInlineAlternativesDelimiter.class.st b/src/Microdown/MicInlineAlternativesDelimiter.class.st index 4b679b5c..10646870 100644 --- a/src/Microdown/MicInlineAlternativesDelimiter.class.st +++ b/src/Microdown/MicInlineAlternativesDelimiter.class.st @@ -6,15 +6,17 @@ I add bold also with `__`, and italic with `*`. " Class { - #name : #MicInlineAlternativesDelimiter, - #superclass : #MicInlineStandardDelimiter, + #name : 'MicInlineAlternativesDelimiter', + #superclass : 'MicInlineStandardDelimiter', #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-InlineParser' + #category : 'Microdown-InlineParser', + #package : 'Microdown', + #tag : 'InlineParser' } -{ #category : #initialization } +{ #category : 'initialization' } MicInlineAlternativesDelimiter class >> initializeDelimiters [ "formating" self new markup: '__'; blockClass: MicBoldFormatBlock; closer: '__'; addMe. diff --git a/src/Microdown/MicInlineBlockWithUrl.class.st b/src/Microdown/MicInlineBlockWithUrl.class.st index 794ca3cf..0b0f5ff5 100644 --- a/src/Microdown/MicInlineBlockWithUrl.class.st +++ b/src/Microdown/MicInlineBlockWithUrl.class.st @@ -8,66 +8,68 @@ 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 : [ 'children', 'url', 'reference', 'arguments' ], - #category : #'Microdown-InlineParser' + #category : 'Microdown-InlineParser', + #package : 'Microdown', + #tag : 'InlineParser' } -{ #category : #parsing } +{ #category : 'parsing' } MicInlineBlockWithUrl class >> parse: token stream: aTokenStream for: aParser [ ^ aParser parseNameUrlBlock: self from: aTokenStream token: token ] -{ #category : #testing } +{ #category : 'testing' } MicInlineBlockWithUrl >> anchor [ ^ self arguments at: #anchor ifAbsent: [ nil ] ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> arguments [ ^ arguments ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> arguments: anObject [ arguments := anObject ] -{ #category : #visiting } +{ #category : 'visiting' } MicInlineBlockWithUrl >> captionElements [ self deprecated: 'Use children instead' transformWith: '`@rec captionElements' -> '`@rec children'. ^ children ] -{ #category : #visiting } +{ #category : 'visiting' } MicInlineBlockWithUrl >> captionElements: someChildren [ self deprecated: 'Use children: instead' transformWith: '`@rec captionElements: `@arg' -> '`@rec children: `@arg'. children := someChildren ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> children [ ^ children ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineBlockWithUrl >> children: anObject [ children := anObject ] -{ #category : #visiting } +{ #category : 'visiting' } MicInlineBlockWithUrl >> closeMe [ "the link url - ![alt text](url) - url is allowed to have title in quotes (url ""title"") " @@ -80,23 +82,23 @@ MicInlineBlockWithUrl >> closeMe [ self arguments: (MicArgumentList withString: title) ] -{ #category : #testing } +{ #category : 'testing' } MicInlineBlockWithUrl >> hasAnchor [ ^ self anchor isNotNil ] -{ #category : #testing } +{ #category : 'testing' } MicInlineBlockWithUrl >> hasArguments [ ^ arguments size > 0 ] -{ #category : #initialization } +{ #category : 'initialization' } MicInlineBlockWithUrl >> initialize [ arguments := OrderedDictionary new. ] -{ #category : #printing } +{ #category : 'printing' } MicInlineBlockWithUrl >> printOn: stream [ stream << self blockName << '{ '. children do: [ :ch | ch printOn: stream. stream nextPut: Character space ]. @@ -105,25 +107,25 @@ MicInlineBlockWithUrl >> printOn: stream [ ] -{ #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: anObject [ url := anObject diff --git a/src/Microdown/MicInlineDelimiter.class.st b/src/Microdown/MicInlineDelimiter.class.st index 4dcbd9a3..dedc304d 100644 --- a/src/Microdown/MicInlineDelimiter.class.st +++ b/src/Microdown/MicInlineDelimiter.class.st @@ -7,55 +7,57 @@ My class side method `initializeDelimiters` gathers delimiters from my subclasse " Class { - #name : #MicInlineDelimiter, - #superclass : #Object, + #name : 'MicInlineDelimiter', + #superclass : 'Object', #classVars : [ 'DelimiterDictionary' ], #pools : [ 'MicMicrodownSharedPool' ], - #category : #'Microdown-InlineParser' + #category : 'Microdown-InlineParser', + #package : 'Microdown', + #tag : 'InlineParser' } -{ #category : #accessing } +{ #category : 'accessing' } MicInlineDelimiter class >> all [ DelimiterDictionary ifNil: [ self initializeDelimiters ]. ^ DelimiterDictionary values ] -{ #category : #'private utilities' } +{ #category : 'private utilities' } MicInlineDelimiter class >> allRegex [ ^ ((MicInlineDelimiter all collect: #markupAsRegex) joinUsing: '|') asRegex ] -{ #category : #accessing } +{ #category : 'accessing' } MicInlineDelimiter class >> at: markup [ "return delimiter at markup, or nil" ^ DelimiterDictionary at: markup ifAbsent: [ nil ] ] -{ #category : #initialization } +{ #category : 'initialization' } MicInlineDelimiter class >> initialize [