Skip to content

Instantly share code, notes, and snippets.

@trauber trauber/mdlp.awk
Last active Aug 1, 2019

Embed
What would you like to do?
Agnostic literate programming for github flavored markdown.
#!/usr/bin/awk -e { if (/^```/) { i++; next } if ( i % 2 == 1) { print } }
# mdlp - agnostic literate programming for github flavored markdown.
# I release this script into the public domain.
# Rich Traube, Fri Feb 15 09:07:27 EST 2013

mdlp

Agnostic literate programming for github flavored markdown in one line of code; provides code from markdown source. Prints to standard output. Great for a single file.

This is in the public domain.

#!/usr/bin/awk -e { if (/^```/) { i++; next } if ( i % 2 == 1) { print } }
# mdlp - agnostic literate programming for github flavored markdown.
# I release this script into the public domain.
# Rich Traube, Fri Feb 15 09:07:27 EST 2013

Fenced code is written to the program in order of occurrence.

# mdlp
Agnostic literate programming for github flavored markdown in one line of
code; provides code from markdown source. Prints to standard output.
Great for a single file.
This is in the public domain.
```awk
#!/usr/bin/awk -e { if (/^```/) { i++; next } if ( i % 2 == 1) { print } }
# mdlp - agnostic literate programming for github flavored markdown.
# I release this script into the public domain.
# Rich Traube, Fri Feb 15 09:07:27 EST 2013
-->
Fenced code is written to the program in order of occurrence.
<!--
vim:et:ai:ts=2
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.