Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Markdown, you should be able to specify a block of code that will not trim whitespace by using four spaces in front of every line of code. Why doesn't it work?

share|improve this question

It does work, you are mostly likely placing a block after a list. Consider separating it with a header

    int main()
^ Four spaces

Will turn into this in your card

int main()
share|improve this answer
A blank line will also do the trick. – Rich Armstrong Jan 31 '12 at 13:20

Code blocks can be placed in comments too. Surround the block with three backticks.

# All your bases are belong to us.

If you'd like to pre-format just a word or function name, surround it with one backtick.

share|improve this answer
That helped! +1 – Anwar Aug 29 '15 at 5:41
Some comments on formatting from the source: help.trello.com/article/821-using-markdown-in-trello – slothbear Aug 30 '15 at 0:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.