News:

Download Pelles C here: http://www.pellesc.se

Main Menu

markdown_parser

Started by TimoVJL, Yesterday at 09:11:39 AM

Previous topic - Next topic

TimoVJL

May the source be with you

John Z

Nice find Timo!

I've used the free Pandoc in the past.
https://pandoc.org/ to do the conversions, very versatile but much bigger of course.
There is also a md2html.exe included in the helpfile utilities in the FAR downloads,
which unfortunately are removed, but I have available.

John Z

MrBcx

Quote from: TimoVJL on Yesterday at 09:11:39 AMA smaller markdown parser found from

https://codereview.stackexchange.com/q/297742


I used an AI agent to produce an improved usable app from the stackexchange project. 

Build.bat uses Gcc but shouldn't be too tough to make a Pelles C project from it.


My zip file contains this sample .md:

https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/Controls/about-combo-boxes.md

* We can drag and drop a *.md file onto MD2HTML.exe and it will create an html file.

* Or you can do something like this:
  C:\Temp\MD2HTML>md2html --dark about-combo-boxes.md
  about-combo-boxes.md -> about-combo-boxes.html (22227 bytes)

* I manually saved the 3 images and created a folder named images next to MD2HTML.

* I made no edits to the markdown file.

* I told the AI agent to add a command line switch, "--dark"  to output a darkmode html.
  Of course, it defaults to light mode.


I personally don't have much need for this but I thought someone on this forum might.

Bcx Basic to C/C++ Translator
https://www.bcxbasiccoders.com

TimoVJL

#3
Thanks, i will test it.
May the source be with you

MrBcx

Quote from: TimoVJL on Yesterday at 06:53:18 PMThanks, i will test it.

Great! Your ppj works as it should. 

FYI -- There are about a dozen and a half command line switch detections that use strcmp that
would be better changed to _stricmp, to allow the switches to be case-insensitive.

There are probably lots of other enhancements that could be made but MD2HTML is pretty usable as it is right now.

Bcx Basic to C/C++ Translator
https://www.bcxbasiccoders.com