Skip to content

Instantly share code, notes, and snippets.

@marawannwh
Created April 1, 2013 09:16
Show Gist options
  • Save marawannwh/5283963 to your computer and use it in GitHub Desktop.
Save marawannwh/5283963 to your computer and use it in GitHub Desktop.
@article_subbed = @article.body.gsub 'startcode', '<pre class="prettyprint">'
@article.body = @article_subbed.gsub 'endcode', '</pre>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment