Skip to content

Instantly share code, notes, and snippets.

@jmakeig
Created August 2, 2013 18:13
Show Gist options
  • Save jmakeig/6142083 to your computer and use it in GitHub Desktop.
Save jmakeig/6142083 to your computer and use it in GitHub Desktop.
Converts leading double spaces into asterisks mostly for converting to Markdown.
perl -pe '1 while s/\G {2}/*/gc' | perl -pe 's/^(.)/*\1/' | perl -pe 's/^(\*+)/\1 /'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment