Markdown reference guide: Difference between revisions

From diaspora* project wiki
(→‎Paragraphs: Corrected instructions for single line breaks.)
Line 8: Line 8:


This is another.</pre>
This is another.</pre>
Sometimes the line breaks are important, such as when you're entering poetry. Simply hit the <tt>ENTER</tt> key within a paragraph should have the desired results.
Sometimes the line breaks are important, such as when you're entering poetry. To do this, add two spaces to the end of each line.


<pre>Roses are red.
<pre>Roses are red.
Violets are blue.
Violets are blue.
I am very bad at poetry.</pre>
I am very bad at poetry.</pre>
Indenting the lines of a paragraph by four spaces will result in a block of preformatted text, which is handy for code samples.
Indenting the lines of a paragraph by four spaces will result in a block of pre-formatted text, which is handy for code samples.


<pre>Hey guys, look at my code!
<pre>Hey guys, look at my code!
Line 19: Line 19:
     10 PRINT &quot;HELLO&quot;
     10 PRINT &quot;HELLO&quot;
     20 GOTO 10</pre>
     20 GOTO 10</pre>
== Links ==
== Links ==



Revision as of 16:20, 20 July 2013

Diaspora supports a number of ways to format messages. These are basically a part of the description language Markdown.

Paragraphs

Paragraphs are separated by blank lines.

This is one paragraph.

This is another.

Sometimes the line breaks are important, such as when you're entering poetry. To do this, add two spaces to the end of each line.

Roses are red.
Violets are blue.
I am very bad at poetry.

Indenting the lines of a paragraph by four spaces will result in a block of pre-formatted text, which is handy for code samples.

Hey guys, look at my code!

    10 PRINT "HELLO"
    20 GOTO 10

Links

Full URLs, for example http://example.org , are automatically converted into links. This also works for ftp:// like ftp://example.org . Furthermore, everything starting with www. is converted into a link, for example www.example.org.

For more control, the Markdown syntax also allows the link to be named. For example

[Official Website](http://example.org)

is Official Website. Key point: square brackets before round.

Text formatting

*Italic Text*

becomes "Italic Text".

**Bold Text**

becomes "Bold Text".

***Bold Italic Text***

becomes "Bold Italic Text".

Similarly, we can also use "_":

___Bold Italic Text___

This allows for nesting:

_Italic **Bold** Text_

becomes "Italic Bold Text".

If needed, a "*" or "_" inside the text can be escaped with the "\" character:

__Use Two \_ for Bold Text__

becomes "Use Two _ for Bold Text". Of course, this can also be used to prevent formatting:

\_Italic_ \**Bold**

becomes "_Italic_ *Bold*".