diff --git a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st index 60316ecf..f04c8699 100644 --- a/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st +++ b/src/Microdown-LaTeXExporter/MicLaTeXWriter.class.st @@ -458,8 +458,8 @@ MicLaTeXWriter >> writeTableCellContent: aCell [ ifTrue: [ canvas command name: 'textbf'; - parameter: [ super visitTableCell: aCell ] ] - ifFalse: [ super visitTableCell: aCell ] + parameter: [ self visitTableCell: aCell ] ] + ifFalse: [ self visitTableCell: aCell ] ] { #category : 'blocks - table' } diff --git a/src/Microdown-Tests/MicrodownParserTest.class.st b/src/Microdown-Tests/MicrodownParserTest.class.st index bdeb040b..64b69c25 100644 --- a/src/Microdown-Tests/MicrodownParserTest.class.st +++ b/src/Microdown-Tests/MicrodownParserTest.class.st @@ -88,7 +88,7 @@ MicrodownParserTest >> testAnchorMarkupInsideLine [ MicrodownParserTest >> testAnnotatedBlock [ | source root annotated | - source := AnnotatedParagraphMarkup , 'important] + source := AnnotatedParagraphOpeningMarkup , 'important] > this is an important paragraph on one line.'. root := parser parse: source. self assert: root children size equals: 1. @@ -147,7 +147,7 @@ MicrodownParserTest >> testAnnotatedBlockBackwardCompatibleWithDifferentLabel [ MicrodownParserTest >> testAnnotatedBlockOnMultipleLinesParserLogic [ | source root annotated line | - source := (AnnotatedParagraphMarkup , 'important] + source := (AnnotatedParagraphOpeningMarkup , 'important] > this is an > important point because...!') readStream. @@ -182,7 +182,7 @@ important point because...!'. { #category : 'tests - annotated-paragraph' } MicrodownParserTest >> testAnnotatedBlockOnTwoLines [ | source root annotated | - source := AnnotatedParagraphMarkup , 'important] + source := AnnotatedParagraphOpeningMarkup , 'important] > this is an important > paragraph on two lines.'. root := parser parse: source. @@ -197,7 +197,7 @@ paragraph on two lines.' { #category : 'tests - annotated-paragraph' } MicrodownParserTest >> testAnnotatedBlockOnTwoLinesWithFormatting [ | source root annotated | - source := AnnotatedParagraphMarkup , 'important] + source := AnnotatedParagraphOpeningMarkup , 'important] > **this** is an _important_ > paragraph on two lines.'. root := parser parse: source. @@ -214,7 +214,7 @@ paragraph on two lines.))' MicrodownParserTest >> testAnnotatedBlockTextElements [ | source root annotated | - source := AnnotatedParagraphMarkup , 'important] + source := AnnotatedParagraphOpeningMarkup , 'important] > this is an **important** paragraph on one line.'. root := parser parse: source. self assert: root children size equals: 1. @@ -231,7 +231,7 @@ MicrodownParserTest >> testAnnotatedBlockWithListParserLogic [ "The test does not test what we want. We want a listblock inside the annotatedBlock" | source root annotated line | self flag: #fixme. - source := (AnnotatedParagraphMarkup , 'important] + source := (AnnotatedParagraphOpeningMarkup , 'important] > this is a point > - one * two ' ) readStream. diff --git a/src/Microdown/MicAnnotatedParagraphBlock.class.st b/src/Microdown/MicAnnotatedParagraphBlock.class.st index f91712e5..aa0f27a6 100644 --- a/src/Microdown/MicAnnotatedParagraphBlock.class.st +++ b/src/Microdown/MicAnnotatedParagraphBlock.class.st @@ -58,7 +58,7 @@ MicAnnotatedParagraphBlock >> initialize [ { #category : 'testing' } MicAnnotatedParagraphBlock >> lineMarkup [ - ^ AnnotatedParagraphMarkup + ^ AnnotatedParagraphOpeningMarkup ] { #category : 'accessing' } diff --git a/src/Microdown/MicMicrodownSharedPool.class.st b/src/Microdown/MicMicrodownSharedPool.class.st index 1cf16b28..49f4d243 100644 --- a/src/Microdown/MicMicrodownSharedPool.class.st +++ b/src/Microdown/MicMicrodownSharedPool.class.st @@ -9,7 +9,8 @@ Class { 'AnchorReferenceCloserMarkup', 'AnchorReferenceOpenerMarkup', 'AnnotatedParagraphBackwardCompatibleMarkup', - 'AnnotatedParagraphMarkup', + 'AnnotatedParagraphClosingMarkup', + 'AnnotatedParagraphOpeningMarkup', 'AnnotationCloserMarkup', 'AnnotationOpenerMarkup', 'ArgumentListDelimiter', @@ -60,7 +61,8 @@ MicMicrodownSharedPool class >> initialize [ AnchorMarkup := '@'. AnnotatedParagraphBackwardCompatibleMarkup := '!!'. "we keep it to avoid breaking existing text but we should favor one that is compatible with github eg the next one" - AnnotatedParagraphMarkup := '>[!'. + AnnotatedParagraphOpeningMarkup := '>[!'. + AnnotatedParagraphClosingMarkup := ']'. CodeblockMarkup := '```'. CommentedLineMarkup := '%'. EnvironmentClosingBlockMarkup := '!>'. diff --git a/src/Microdown/MicMicrodownTextualBuilder.class.st b/src/Microdown/MicMicrodownTextualBuilder.class.st index bebfc7a5..ebbfbbb6 100644 --- a/src/Microdown/MicMicrodownTextualBuilder.class.st +++ b/src/Microdown/MicMicrodownTextualBuilder.class.st @@ -43,27 +43,16 @@ MicMicrodownTextualBuilder >> anchorReference: aText [ { #category : 'element - annotated' } MicMicrodownTextualBuilder >> annotated: annotation paragraph: aBlock [ - "!!Important + "Was !!Important + + attention there is not space between the !! and the label (annotation in pillar) or we should improve the microdown parser. + Now this is >[! Important ]" - attention there is not space between the !! and the label (annotation in pillar) or we should improve the microdown parser" self rawAnnotated: annotation paragraph: aBlock. self newLine ] -{ #category : 'element - annotated' } -MicMicrodownTextualBuilder >> annotatedAnnotation: annotation [ - "I'm made to be followed by a paragraph. I manage the space between the annotation/label and the paragraph." - - "!!Important there is not space between the !! and the label (annotation in pillar) or we should improve the microdown parser" - self - raw: AnnotatedParagraphMarkup; - raw: annotation; - raw: String space - - -] - { #category : 'element - annotated' } MicMicrodownTextualBuilder >> annotation: aString arguments: aDictionary [ @@ -519,17 +508,27 @@ MicMicrodownTextualBuilder >> raw: aString [ { #category : 'element - annotated' } MicMicrodownTextualBuilder >> rawAnnotated: annotation paragraph: aBlock [ - "!!Important + "It was !!Important + + attention there is not space between the !! and the label (annotation in pillar) or we should improve the microdown parser + + now we use - attention there is not space between the !! and the label (annotation in pillar) or we should improve the microdown parser" + >[! Important] + > text + > text2 + + " + self - raw: AnnotatedParagraphMarkup; + raw: AnnotatedParagraphOpeningMarkup; raw: annotation; - raw: $]; + raw: AnnotatedParagraphClosingMarkup ; raw: Character cr; raw: $>; raw: String space; - rawParagraph: aBlock + rawParagraph: aBlock; + raw: Character cr ] diff --git a/src/Microdown/MicrodownParser.class.st b/src/Microdown/MicrodownParser.class.st index 3299170f..773ea59a 100644 --- a/src/Microdown/MicrodownParser.class.st +++ b/src/Microdown/MicrodownParser.class.st @@ -263,7 +263,7 @@ MicrodownParser >> initialize [ dispatchTable at: AnchorMarkup put: MicAnchorBlock. dispatchTable at: HeaderMarkup put: MicHeaderBlock. dispatchTable at: CodeblockMarkup put: MicAbstractCodeBlock. - dispatchTable at: AnnotatedParagraphMarkup put: MicAnnotatedParagraphBlock. + dispatchTable at: AnnotatedParagraphOpeningMarkup put: MicAnnotatedParagraphBlock. dispatchTable at: AnnotatedParagraphBackwardCompatibleMarkup put: MicAnnotatedParagraphBlock. dispatchTable at: CommentedLineMarkup put: MicCommentBlock. dispatchTable at: HorizontalLineMarkup put: MicHorizontalLineBlock.