cld-ssg

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit bc5dd10526f6a333107b3098a45d4df0219c15c9
Author: Christopher Ray Langford <chris@hellocld.com>
Date:   Sat, 31 Aug 2019 16:40:54 -0400

Init commit

Program builds and poops out some simple html from some md

Diffstat:
A.gitignore | 2++
AMakefile | 14++++++++++++++
Amain.c | 14++++++++++++++
3 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,2 @@ +*.sw[p,o] +bin/* diff --git a/Makefile b/Makefile @@ -0,0 +1,14 @@ +CC = gcc +CFLAGS = -Wall -pedantic +CLIBS = -lcmark + +default: dirs main.c + $(CC) $(CFLAGS) main.c -o ./bin/cld-ssg $(CLIBS) + +dirs: + if [ ! -d ./bin ] ; then mkdir bin ; fi + +clean: + if [ -d ./bin ] ; then rm -rf ./bin/* ; fi + + diff --git a/main.c b/main.c @@ -0,0 +1,14 @@ +#include "cmark.h" +#include <stdlib.h> +#include <string.h> + +int main() +{ + char *md = "This is a *test* of some `markdown`"; + + char *html = cmark_markdown_to_html(md, strlen(md), CMARK_OPT_DEFAULT); + printf("%s\n", html); + free(html); + + return 0; +}