From c27edcdfe63899c9672e7ee07fdea1aebb5d0591 Mon Sep 17 00:00:00 2001 From: "quentin.moutte.etu" Date: Sat, 10 Aug 2024 16:43:41 +0200 Subject: [PATCH] fix broken test --- src/Microdown/MicAnnotationBlock.class.st | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Microdown/MicAnnotationBlock.class.st b/src/Microdown/MicAnnotationBlock.class.st index 01aed011..c53b32fd 100644 --- a/src/Microdown/MicAnnotationBlock.class.st +++ b/src/Microdown/MicAnnotationBlock.class.st @@ -43,7 +43,7 @@ MicAnnotationBlock class >> openingDelimiter [ { #category : 'parsing' } MicAnnotationBlock class >> parse: delimiter stream: aTokenStream for: aParser [ - | bodystring arguments tag extensionClass key | + | bodystring arguments tag extensionClass | bodystring := delimiter undelimitedSubstring. arguments := MicArgumentList split: bodystring @@ -53,8 +53,11 @@ MicAnnotationBlock class >> parse: delimiter stream: aTokenStream for: aParser [ extensionClass := self extensionClassFor: tag. - key := arguments justTheArguments keyAtIndex: 1. - (arguments at: key) ifNil: [ arguments at: extensionClass key put: key ]. + arguments justTheArguments ifNotEmpty: [ | key | + key := arguments justTheArguments keyAtIndex: 1. + (arguments at: key) ifNil: [ arguments at: extensionClass key put: key ]]. + + ^ extensionClass new bodyString: bodystring;