When a code block is started using 3 back apostrophs showdown doesn't consider it a code block until explicitly terminated.
Could it be the default or a separate setting to also support incomplete blocks (whether code or something else). This would make e.g. responses from an LLM look much less "jumpy" (and less wrong) when streaming, where partial data is a given.
If you provide a pointer to where this would be handled I can take a look myself.
For you to consider:
Regarding the behavior of smoothLivePreview:
When a code block is started using 3 back apostrophs showdown doesn't consider it a code block until explicitly terminated.
Could it be the default or a separate setting to also support incomplete blocks (whether code or something else). This would make e.g. responses from an LLM look much less "jumpy" (and less wrong) when streaming, where partial data is a given.
If you provide a pointer to where this would be handled I can take a look myself.
I thought this was similar, but it's not: https://github.com/showdownjs/showdown/issues/1000
Conversion to HTML otherwise works quite well, also for partial streamed data.