/md2code

Generates compilable source code from markdown files.

Primary LanguageRustBSD 2-Clause "Simplified" LicenseBSD-2-Clause

md2code

Generates source code from markdown files.

Example

hello-world.md:

# Hello World

This is a hello-world example:
```c
printf("Hello World\n");
```

Run md2code --lang c --include stdio.h hello-world.md:

#include <stdio.h>

////////////////////////////////////////////////////////////////////////////////
// # Hello World
// 
// This is a hello-world example:
static void line_4(void) {
	printf("Hello World\n");
}
////////////////////////////////////////////////////////////////////////////////
int main(int argc, char *argv[]) {
	line_4();
	return 0;
}

Supported Language

  • c
  • shell script