Markdown syntax: Difference between revisions
From wikinotes
(→Links) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 32: | Line 32: | ||
* <code>-</code> for header-2 | * <code>-</code> for header-2 | ||
</blockquote><!-- Headers --> | </blockquote><!-- Headers --> | ||
== Text Formatting == | |||
<blockquote> | |||
<syntaxhighlight lang="md"> | |||
*emphasize txt* _emphasize txt_ # <em> | |||
**strong txt** __strong txt__ # <strong> | |||
</syntaxhighlight> | |||
</blockquote><!-- Text Formatting --> | |||
== Links == | == Links == | ||
Line 58: | Line 66: | ||
</blockquote><!-- Links --> | </blockquote><!-- Links --> | ||
== | == Blockquotes == | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="md"> | <syntaxhighlight lang="md"> | ||
a regular paragraph | |||
> an indented | |||
> paragraph | |||
> | |||
> > a double-indented paragraph | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- | </blockquote><!-- Blockquotes --> | ||
== | == Images == | ||
<blockquote> | <blockquote> | ||
<syntaxhighlight lang="md"> | <syntaxhighlight lang="md"> | ||
![kittens](/path/to/kittens.png) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- | </blockquote><!-- Images --> | ||
== Code == | == Code == |
Latest revision as of 13:56, 19 September 2021
These notes are based on the base markdown spec. Ideally, this should be supported by all parsers.
Parsers may introduce additional features.
Documentation
official docs https://daringfireball.net/projects/markdown/syntax
Syntax
Headers
Headers can be defined using hash prefix, or underlines.
# Header 1 ## Header 2 ### Header 3 Header 1 ======== Header 2 --------For underlines, the character matters
=
for header-1-
for header-2Text Formatting
*emphasize txt* _emphasize txt_ # <em> **strong txt** __strong txt__ # <strong>Links
Automatic Links
<https://wikipedia.com>External Links
See [wikipedia article](https://en.wikipedia.org/wiki/Markdown).Relative Links
See [other page](samesite/page)Cross-References (same-page links)
See [Official Docs][docs] ## Official Documentation [docs]Blockquotes
a regular paragraph > an indented > paragraph > > > a double-indented paragraphImages
![kittens](/path/to/kittens.png)Code
Newline+Indented text is put in a
pre
block.Checkout this function def foo(bar): print("baz")Inline code is entered between
`
s.The `def` here is foo.
Lists
List Types
Unordered lists can be defined with
*
,+
, or-
.* red + yellow - blueOrdered lists use numbers with periods.
1. one 2. two 3. threeList Items
Long list-items with hanging indents
* a very long list item, separated across multiple linesItems containing quotes
* then vader says > I am altering the deal, > pray I don't alter it againItems contianing code (indented by 8-spaces)
* check out this function def foo(bar): print("baz")