Created
          February 20, 2012 12:36 
        
      - 
      
- 
        Save mjf/1869028 to your computer and use it in GitHub Desktop. 
    Markdown2Dokuwiki - Reformat Markdown to Dokuwiki
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #! /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/ | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment