### Shortcut Reference Link Example Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt Example of shortcut reference link definitions. ```markdown [foo] [bar] [foo]: /url1 [bar]: /url2 ``` -------------------------------- ### HTML Block Parsing Examples Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt Examples demonstrating various HTML block types and their interaction with Markdown content. ```markdown -
foo
``` ```markdown *bar* *baz* . *bar*baz
``` ```markdown 1. *bar* . 1. *bar* ``` ```markdown okay .okay
``` ```markdown '; ?> okay . '; ?>okay
``` ```markdown . ``` ```markdown okay .okay
``` ```markdown .<!-- foo -->
```
```markdown
<div>
```
```markdown
Foo
Foo
Foo baz
``` ```markdownEmphasized text.
| Hi |
| Hi |
: http://google.com https://google.com
http://google.com/å http://google.com/å
scy.the_rbe-edr+ill@pokemon.com
scyther@pokemon.com/beedrill@pokemon.com
This is a mailto:scyther@pokemon.com
mmmmailto:scyther@pokemon.com
mailto:scyther@pokemon.com/message
mailto:scyther@pokemon.com/mailto:beedrill@pokemon.com
xmpp:scyther@pokemon.com/message
xmpp:scyther@pokemon.com/message.
Email me at:scyther@pokemon.com
www.github.com www.github.com/á
Underscores not allowed in host name www.xxx.yyy._zzz
Underscores not allowed in host name www.xxx._yyy.zzz
Underscores allowed in domain name www._xxx.yyy.zzz
Autolink and http://inlines
Full stop outside parens shouldn't be included http://google.com/ok.
(Full stop inside parens shouldn't be included http://google.com/ok.)
``` -------------------------------- ### Ordered List with Zero Start Number Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt Ordered lists can start with '0'. This is a valid start number. ```markdown 0. ok . ``` ```html| hi |
| hi |
okay.
``` ```markdown| foo |
| foo |
foo _
``` ```markdown foo __*__ .foo *
``` ```markdown __foo_ ._foo
``` ```markdown _foo__ .foo_
``` ```markdown ___foo__ ._foo
``` ```markdown ____foo_ .___foo
``` ```markdown __foo___ .foo_
``` ```markdown _foo____ .foo___
``` -------------------------------- ### Tilde Code Fence Example Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt Demonstrates the use of tildes for code fences, including cases with special characters in the fence. ```markdown ```````````````````````````````` example ~~~~~~ aaa ~~~ ~~ .aaa
~~~ ~~
````````````````````````````````
```
--------------------------------
### Unclosed HTML Tag Example
Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt
Demonstrates an HTML block with an unclosed tag, showing how the content is rendered.
```html
bar
``` -------------------------------- ### Markdown List Starting with Empty Item Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt Illustrates a Markdown list that begins with an empty list item. ```markdown * ``` ```htmlaaa
````````````````````````````````
```
--------------------------------
### Emphasis Parsing Rules
Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt
Examples illustrating complex parsing scenarios involving mixed delimiters and inline elements.
```markdown
*foo _bar* baz_
.
foo _bar baz_
``` ```markdown *foo __bar *baz bim__ bam* .foo bar *baz bim bam
``` ```markdown **foo **bar baz** .**foo bar baz
``` ```markdown *foo *bar baz* .*foo bar baz
``` ```markdown *[bar*](/url) .*bar*
``` ```markdown _foo [bar_](/url) ._foo bar_
``` ```markdown **
a *
a _
[foo]: /url 'title
with blank line'
[foo]
``` ```markdown [foo]: [foo] .[foo]:
[foo]
``` ```markdown [foo]:[foo]:
[foo]
``` ```markdown [foo]: /url "title" ok .[foo]: /url "title" ok
``` ```markdown [foo]: /url "title" ok ."title" ok
``` ```markdown [foo]: /url "title" [foo] .[foo]: /url "title"
[foo]
``` ```markdown ``` [foo]: /url ``` [foo] .[foo]: /url
[foo]
``` -------------------------------- ### Plain text content parsing Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt Examples of how special characters, non-ASCII characters, and multiple spaces are handled as plain text. ```markdown hello $.;'there .hello $.;'there
``` ```markdown Foo χρῆν .Foo χρῆν
``` ```markdown Multiple spaces .Multiple spaces
``` -------------------------------- ### HTML Block with Custom Tag Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt Illustrates an HTML block starting with a custom tag name, which can be anything. ```htmlbar
baz
A paragraph with two lines.
indented code
A block quote.
aaa
```
````````````````````````````````
```
--------------------------------
### Partial HTML Tag Example
Source: https://github.com/github/cmark-gfm/blob/master/test/spec.txt
Illustrates how cmark-gfm handles HTML blocks with partially formed tags.
```html
-1. not ok
``` -------------------------------- ### Configure Parser and Rendering Options Source: https://context7.com/github/cmark-gfm/llms.txt Shows how to use option flags to control smart punctuation, security settings, source position inclusion, and line break handling. ```c #include