Skip to content

Instantly share code, notes, and snippets.

@pletiplot
Forked from mjf/markdown2dokuwiki.sed
Created February 20, 2012 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save pletiplot/1869031 to your computer and use it in GitHub Desktop.
Save pletiplot/1869031 to your computer and use it in GitHub Desktop.
Markdown2Dokuwiki - Reformat Markdown to Dokuwiki
#! /bin/sed -f
## Markdown2Dokuwiki - reformat Markdown to Dokuwiki
## Copyright (C) 2012 Matous J. Fialka, <http://mjf.cz/>
## Released under the terms of The MIT License
## TODO: many things yet...
# reformatovani nadpisu
s/^#####/==/
s/^####/===/
s/^###/====/
s/^##/=====/
s/^#/======/
# doplneni prave casti nadpisu
/^=/ {
s/^\(=\+\)\(.*\)/\1\2 \1/
}
# reformatovani cislovanych seznamu
s/^[ \t]*[0-9]\.[ \t]\+\(.*\)/ - \1/
@dryoo
Copy link

dryoo commented Sep 8, 2015

Any progress??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment