Microdown
Microdown copied to clipboard
MicRealDumper is broken
It is so bad I am wondering to leave it and its test out. It is not broken beyond repair, but it is unclear if it will be used?
Example:
(MicRealDumper new visit: (Microdown parse: '**aaa_bbb_ccc**')) contents
gives:
'(MicParagraphBlock new textElements: {(MicBoldFormatBlock new textElement: (MicTextBlock new substring: ''aaa''))})'
Which is quite wrong!
visitBold: aMicBold
stream nextPut: $(.
self emitClassNameOf: aMicBold.
stream space.
stream
nextPutAll: 'new';
space.
stream nextPutAll: 'textElement: '.
aMicBold children first accept: self.
stream nextPut: $)
second last line visits only first line.
An other example is
visitLink: aMicLink
stream nextPut: $(.
self emitClassNameOf: aMicLink.
stream space.
stream
nextPutAll: 'new';
space.
stream nextPutAll: 'textElement: '.
stream nextPut: $[.
stream nextPutAll: aMicLink substring.
stream nextPut: $].
stream nextPut: $(.
stream nextPutAll: aMicLink url.
stream nextPut: $)
where the link should be done by traversing the children.
This is a nice functionality when you debug, but this is the only topic I found for a not so good student.
I will let it to fix as a warmup for some people but yes I share your feelings.
Working on it with bastien