Log In or Sign Up

Forums

Inserting Code Inline

With the recent release of snippets it is now also possible to embed nicely styled code anywhere you see a “Formatted” text area! Just use this syntax:

!! lang:ruby
! ---
def some_code
  # goes here
end
! ---
And it will generate a code block that looks like this:
def some_code
  # goes here
end

Supported languages are many, but some of the ones that will probably be popular around here are ruby, rails, html, css, and javascript.

Profile Photo Michael Bleigh 14 posts posted 10 months ago updated 10 months ago