-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.txt
86 lines (58 loc) · 1.25 KB
/
spec.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
== headings ==
1 to 6 hashes at line start followed by a space,
then any text, then a newline
\n# yap\n -> <h1>yap</h1>
\n## yap \n -> <h2>yap </h2>
etc
== lists ==
single dash followed by a space, then any text, then newline
- one
- two
- three
- four
- five
becomes
<ul>
<li>one</li>
<li>two</li>
etc you get it
</ul>
=== paragraphs ===
After all other possible tags are checked for
the next \n* starts a paragraph, then a \n\n or \n# or \n-
terminates the paragraph.
if the string ends at an point inside a paragraph the closing
</p> will always be applied (no unmatched html tags)
yap yap yap yap
yap yap
yap yap yap
becomes
<p>yap yap yap yap
yap yap</p>
<p>yap yap yap</p>
--- inline code ---
inside a paragraph ` starts a code segment then ` or string end closes it
--- em ---
same as inline code but with *
--- bold ---
inside a paragraph ** starts a bold segment then ** or string
end closes it
== horizontal rule ===
newline then > 3 dashes = horizontal rule
\n--- -> <hr/>
== links ==
inside a paragraph [text](url) is a link
- nothing between ] and (
- no newlines within [] or ()
== code ==
newline then ``` starts fenced code, then ``` or string end
closes it
```
yap yap yap
yap
```
becomes
<pre><code>
yap yap yap
yap
</code></pre>