Microdown icon indicating copy to clipboard operation
Microdown copied to clipboard

Builder codeBlock: logic should encapsulate newLine

Open Ducasse opened this issue 1 year ago • 1 comments

It forces clients to emit newLine

        canvas newLine.
	canvas codeblock: aCodeBlock text firstLineAssociations: parameters associations.

and if they forget then they may generate broken code.

Ducasse avatar Aug 12 '24 14:08 Ducasse

Pay attention to then review all the senders of codeblock:firstLineAssociations: to remove the preceeeding newLine

testSimpleCodeBlockWithFirstTag
	"```language=Pharo
	Hello
	Pharo
	```"
	| mictext |
	mictext := builder newLine; codeblock: self exampleTextMultipleLines firstLineAssociations: {'language' -> 'Pharo'} ; contents.
	self testWithInitialText: mictext.
	self assert: ('*language*' match: mictext) 

Ducasse avatar Aug 21 '24 07:08 Ducasse