diff --git a/src/Microdown-Tests/MicrodownTest.class.st b/src/Microdown-Tests/MicrodownTest.class.st index 874db2d9..c6058110 100644 --- a/src/Microdown-Tests/MicrodownTest.class.st +++ b/src/Microdown-Tests/MicrodownTest.class.st @@ -91,6 +91,7 @@ MicrodownTest >> testParentLinkIsKeptOnReplaceBy [ new := MicTextBlock new. new bodyString: 'New'. + self halt. original replaceBy: new. self assert: h children size equals: 1. self assert: h children first equals: new. diff --git a/src/Microdown/MicElement.class.st b/src/Microdown/MicElement.class.st index 23c3b918..79ff0df2 100644 --- a/src/Microdown/MicElement.class.st +++ b/src/Microdown/MicElement.class.st @@ -157,10 +157,7 @@ MicElement >> replaceBy: aMicElement [ Make sure that the new element parent is the parent of the receiver." parent replace: self by: aMicElement. - "We use basicParent and not parent, - because parent is doing an addChild:" - aMicElement basicParent: parent. - parent := nil. + ] { #category : 'public' }