Attempt to handle stream markdown. The main purpose of this small project was to handle the local AIs on the local machine. This is why this is not covering the full markdown but only the basics and even there lists are not handled yet. Perhaps this will be added later upon requrest.
Clone the repo or dowload stream_md_processor.js
.
Add wherever you need it:
<script src="ypur_path/stream_md_processor.js"></script>
Call it:
StreamMarkdownProcessor.processStreamChunk(chunk, recipient);
where
chunk
is received bit of the streamrecipient
is either a DOM element which serves as a container, or a function that will return a DOM element.
if needed the raw stream content get it:
StreamMarkdownProcessor.getRawContent();
At the end kindly free the resources:
StreamMarkdownProcessor.dispose();
Here is the result of this Readme file source processed: