I am guessing that since the response is streaming, using showdown or other such libraries is tough as the markdown may not be finished in the streamed text, leaving the markdown to show as is without the “conversion” to HTML
Anyway, has anyone had luck with a good library to use to convert markdown from the API to HTMl please? I am reluctant to reinvent the wheel here
With CURL, you can confirm that it works by doing:
curl -X POST -H “Content-Type: text/plain” --data-binary @YourMarkDownFileName.mdhttps://api.github.com/markdown/raw -o YourHTMLFileName.html
I know it is a parsing thing… but am lazy to reinvent it (look for markup content in streamed chunk, if doesn’t exist then append to text… and store the info in a variable…) and then in next chunk if it exists, then treat it as a closing markdown… yuckkk…i may go round in circles