Forum discussions on CodeProject use Markdown as an option for formatting text. "Markdown" is not a standard: it's a loose, but generally agreed upon, understanding of how ASCII text should be displayed when certain non-alphanumeric characters are added as decorations to words and text blocks.
The Markdown CodeProject uses is very similar to that used in GitHub, Atlassian and StackExchange with some small variations.
Note: Markdown accepts HTML tags. If you include valid HTML tags in your content then they will be rendered as HTML. If you include invalid HTML tags (eg "<tag>") then it will be automatically HTML encoded an not processed as HTML.
Use #, ##, ### etc to generate H1, H2, H3 headings
# Heading level 1 ## Heading level 2
Which produces
Alternatively you can underline headings with === or --- to get level 1 and level 2 headings:
Heading 1 ========= Heading 2 ---------
Paragraphs are created simply by typing text and separating the text by a blank line. Newlines are preserved.
This is a paragraph
This is a new line
This is a separate paragraph
Inline code is specified using matching `` or ´´ pairs around the code:
This is a ``variable`` name.
Produces
This is a variable
name.
Code blocks are specified using matching ``` or ´´´ pairs at the top and bottom of the code block on separate lines:
``` var int i = 0; ```
Produces
var int i = 0;
The language of the code block can be specified by adding it directly after the ```:
```cs var int i = 0; ``` ```javascript var int i = 0; ```
If you wish to include ``` in your codeblocks (eg to demonstrate Markdown examples) then you can escpe the markup using \:
```text Your codeblocks should be of the form \```C# // some code \``` ```
will produce
Your codeblocks should be of the form ```C# // some code ```
You can use multiple backticks as the delimiters if you want to include literal backticks in the code span.
Just type ``foo `bar` baz`` at the prompt.
will produce
Just type foo `bar` baz
at the prompt.
Bold, italics and strikethrough are supported by wrapping text in **, * (or_) and -- respectively
This is **bold**, *italics* and --strikethrough--
Produces
This is bold, italics and
strikethrough.
Use * or - to form unordered lists:
- Apples - Pears - Oranges
Produces
Prefix list items with a number.
1. First 2. Second 3. Third
Produces
Nested lists can be generated by indenting subitems two or more spaces.
1. First 2. Second - Sub-Second
Produces
Prefix each line in the quote by ">":
> This is a quote > from someone famous. > > This is a new paragraph inside the quote
Produces
This is a quote from someone famous.
This is a new paragraph inside the quote
Either prefix the link by http:// to have it auto-linked, or wrap the link text in [] and the link URL by () to generate a hyperlink:
Visit [CodeProject](www.codeproject.com). Its URL is http://www.codeproject.com.
Produces
Visit CodeProject. Its URL is http://www.codeproject.com.
If you wish to specify a title (tooltip) for your link, add the title in quotes after the URL:
Visit [CodeProject](www.codeproject.com "CodeProject"). Its URL is http://www.codeproject.com.
Markdown was originally created to allow blog content to be converted from plain ASCII to HTML in the simplest, least painful method. Multiple lines were combined into single paragraphs, and paragraph breaks required a blank line. This follows what you'd expect from text written in Notepad.
On CodeProject there is a certain expectation that what you see (in terms of linebreaks) is what you get. Hence we have decided to preserve line breaks.
Like GitHub, we suppress the processing of multiple underscores in words. my_var_name
would traditionally be rendered as myvarname which makes discussing code very hard.
This is not standard Markup.
This is not standard Markup. Nor is the BLINK tag. This makes us sad.
The use of ``` to deliniate code blocks is a GitHub extension we choose to follow for the sake of established Markdown users. We added "´" as an option for those with European keyboards.
Unlike GitHub we do not support Markdown tables.