Clarification of using syntax highlighting


(Zachary Lewis) #1

@JonathanStoler has brought it to my attention that using the Github-flavored markdown isn’t clearly described enough in the forum. Here’s a quick example of how to properly share and discuss code.

Inline Code

Inline code is very useful for clarifying what part of your text is in reference to a variable and what is not. Take a look at the following two sentences and decide which is more clear.

Make sure enabled is true.


Make sure enabled is true.

To add inline code, surround whatever you’d like to represent as code with a single tick `. It should look like the following example. You’ll be able to see in the preview what the output will look like.

Make sure enabled is true.

Make sure enabled is true.

Code Blocks

To share a block of code, start off with three tick marks and the language of your code. For the most part, it will be actionscript. Then, paste your code (preferably with indentions of two spaces). Finally, close all the code with another three tick marks. All said and done, it will look like the following example. You’ll be able to see in the preview what the output will look like.

``` actionscript
public function foo():void
{
  trace("bar");
}
```

public function foo():void
{
  trace("bar");
}

Advanced Formatting

If you’d like to do advanced formatting to your posts, take a look at GitHub Flavored Markdown. The forum doesn’t support every bit of it, but much of it is supported.


How do i properly create a variable?
(Zachary Lewis) #2

This topic is now pinned. It will appear at the top of its category until it is either unpinned by a moderator, or the Clear Pin button is pressed.