Skip to content

Instantly share code, notes, and snippets.

Created April 27, 2013 16:30
Show Gist options
  • Save anonymous/57444f27311d8815a737 to your computer and use it in GitHub Desktop.
Save anonymous/57444f27311d8815a737 to your computer and use it in GitHub Desktop.
text = text.gsub(/^(\*+)(.*)\1$/){ "<h#{$1.length}>#{$2}</h#{$1.length}>" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment