Skip to content

Instantly share code, notes, and snippets.

@RicardoDeLosSantos
Forked from trauber/mdlp.awk
Created July 23, 2016 09:25
Show Gist options
  • Select an option

  • Save RicardoDeLosSantos/8c97c7ffce61b9d2489a5dc47d933c37 to your computer and use it in GitHub Desktop.

Select an option

Save RicardoDeLosSantos/8c97c7ffce61b9d2489a5dc47d933c37 to your computer and use it in GitHub Desktop.
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