16

When I try to paste code into Trello I get very weird formatting after saving but it seems it does format code, I just can't get it to work right. Currently I'm just putting links to Gist, but I would prefer to just paste it straight in there.

20

Include formatted code by wrapping it in three backticks (```) at the beginning and end of the block, or by starting a line with four spaces.

Important note — the triple backticks have to be on a separate line and ensure you have a blank line before and after the code block.

5

Either surround the code by backticks (`) for smaller segments of code, or make sure that each line begins with a tab or at least four spaces.

2

Finally found the answer here:

http://daringfireball.net/projects/markdown/syntax#code

using markdown is outdated, its not as easy as just using Gist haha, think I'll keep that route... they should really work on their tools.

  • 1
    I don't feel that merely because someone feels Tool-A is "not just as easy as" Tool-B that that makes Tool-A "outdated" and worthless. I happen to love Markdown, and it is used by far more tools than Gist. Plus, Gist is aimed really at CODE -- Markdown is aimed at DOCUMENTATION. Two different tools. – Bane May 7 '15 at 17:00
2

I know that the subject is a bit old, but I found myself faced with this problem.

I wrote an userscript if anyone is interested in it. It works with triple backslash with line feed and allows syntax highlighting, according to the indicated language.

(edit: here)

Eg:

# Title

Text line

```javascript
    import Vue from 'vue';
    import App from './App.vue';

    let vm = new Vue({
        el: '#box',
        render: h => h(App)
    });
```

Text...

Result:

Trello syntax highlight result

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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