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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Markdown Format Extension - BlueFeather Manual</title>
<link rel="stylesheet" type="text/css" href="black.css" />
</head>
<body>
<div class="back"><a href="index.html">BlueFeather Manual</a></div>
<h1 id="bfheader-d41a6cb49287d60ba63f6a84208d0866">Markdown Format Extension</h1>
<p>BlueFeather has imported some extensions addition to the
<a href="http://daringfireball.net/projects/markdown/">original Markdown syntax</a>.</p>
<ul>
<li><a href="#bfheader-e94f9ae30ec0c63304942ba4d35482f1" rel="toc">From PHP Markdown Extra</a>
<ul>
<li><a href="#bfheader-ddab8aae0154722057b75219baf50923" rel="toc">Definition List (dl)</a></li>
<li><a href="#bfheader-8b213ded385c637758f8c3705eb6386a" rel="toc">Footnote</a></li>
<li><a href="#bfheader-e423def58198a19aa63d83b521d0f072" rel="toc">Header-id attribute</a></li>
<li><a href="#bfheader-b02dbf47a00cea8a287701a1624b9907" rel="toc">Fenced Code Block</a></li>
<li><a href="#bfheader-51c45b795d5d18a3e4e0c37e8b20a141" rel="toc">Table</a></li>
<li><a href="#bfheader-a3776b29531690e7f4f451f5bdcc2ea9" rel="toc">Difference from PHP Markdown Extra</a></li>
</ul></li>
<li><a href="#bfheader-4f4019ecdcaa30646c3630f3a3b8c9f3" rel="toc">BlueFeather Original</a>
<ul>
<li><a href="#bfheader-6994206aa5146e62315e61b6ecf6f56b" rel="toc">TOC</a></li>
<li><a href="#bfheader-8546ff2176bfead78c6ab1cb907ea60e" rel="toc">Block Separator</a></li>
</ul></li>
</ul>
<h2 id="bfheader-e94f9ae30ec0c63304942ba4d35482f1">From PHP Markdown Extra</h2>
<ul>
<li>If you want to know about original PHP Markdown Extra, see the <a href="http://michelf.com/projects/php-markdown/extra/">http://michelf.com/projects/php-markdown/extra/</a>.</li>
</ul>
<h3 id="bfheader-ddab8aae0154722057b75219baf50923">Definition List (dl)</h3>
<p>Pair of a term and a sentence which starts with <code>:</code> symbol is parsed
as <em>Definition List.</em></p>
<pre><code>Mandarin
: Orange and sweet-sour.
Apple
: Red and sweet.
</code></pre>
<blockquote>
<dl>
<dt>Mandarin</dt>
<dd>Orange and sweet-sour.</dd>
<dt>Apple</dt>
<dd>Red and sweet.</dd>
</dl>
</blockquote>
<p>You can use multiple terms, multiple sentences, or both. </p>
<pre><code>Mandarin
: Orange.
: Sweet-sour.
Apple
Ringo
: Red and sweet.
</code></pre>
<blockquote>
<dl>
<dt>Mandarin</dt>
<dd>Orange.</dd>
<dd>Sweet-sour.</dd>
<dt>Apple</dt>
<dt>Ringo</dt>
<dd>Red and sweet.</dd>
</dl>
</blockquote>
<p>And that, you can make sentences a paragraph element by blank-line, and you can
append any block-level elements after the paragraph by indent.</p>
<pre><code>Mandarin
: Orange and sweet-sour. Used for juice.
Apple
: Has these features.
* Sweet
* Red and globular
</code></pre>
<blockquote>
<dl>
<dt>Mandarin</dt>
<dd><p>Orange and sweet-sour. Used for juice.</p></dd>
<dt>Apple</dt>
<dd><p>Has these features.</p>
<ul>
<li>Sweet</li>
<li>Red and globular</li>
</ul></dd>
</dl>
</blockquote>
<h3 id="bfheader-8b213ded385c637758f8c3705eb6386a">Footnote</h3>
<p>Such as that text, parsed as <em>footnote</em>.</p>
<pre><code>That's some text with a footnote.[^1]
[^1]: And that's the footnote.
</code></pre>
<blockquote>
<p>That's some text with a footnote.<sup id="footnote-ref:1"><a href="#footnote:1" rel="footnote">[1]</a></sup></p>
</blockquote>
<p>Definition of footnote can be in any places.</p>
<p>And that, instead of number, any ids. </p>
<pre><code>That's some text with a footnote.[^ex-fn]
[^ex-fn]: And that's the footnote.
</code></pre>
<h3 id="bfheader-e423def58198a19aa63d83b521d0f072">Header-id attribute</h3>
<p>You can add header-id attribute.</p>
<pre><code>Recipe {#recipe}
----
See the section of [Recipe](#recipe).
</code></pre>
<pre><code>## Recipe ## {#recipe}
----
See the section of [Recipe](#recipe).
</code></pre>
<blockquote>
<h2 id="recipe">Recipe</h2>
<p>See the section of <a href="#recipe">Recipe</a>.</p>
</blockquote>
<p>Be careful, <em>any character except line-break (LF) is NOT allowed after id.</em></p>
<h3 id="bfheader-b02dbf47a00cea8a287701a1624b9907">Fenced Code Block</h3>
<pre><code>~~~
A range from a line which starts with three or more tildes (~) to another
line same as it is parsed as code-block.
~~~
</code></pre>
<blockquote>
<pre><code>A range from a line which starts with three or more tildes (~) to another
line same as it is parsed as code-block.
</code></pre>
</blockquote>
<h3 id="bfheader-51c45b795d5d18a3e4e0c37e8b20a141">Table</h3>
<p>Cells separated pipe-symbol ( <code>|</code> ) are parsed as table. 1st line is headers.
2nd line is separators. And 3rd or later line is data.</p>
<pre><code>|Name |Color |Number|
fcfd1dbc26fe1eb65b18b627e8ea89e8
</code></pre>
<blockquote>
<table>
<thead><tr>
<th>Name</th>
<th>Color</th>
<th>Number</th>
</tr></thead>
<tbody>
<tr>
<td>Apple</td>
<td>Red</td>
<td>8</td>
</tr>
<tr>
<td>Mandarin</td>
<td>Orange</td>
<td>32</td>
</tr>
</tbody>
</table>
</blockquote>
<p>Right borders and spaces is optional.</p>
<pre><code>|Name |Color |Number
fcfd1dbc26fe1eb65b18b627e8ea89e8
bf9ccdcc0cb9c1c670dad6cbca029ad5
</code></pre>
<p>But, be careful, <em>left borders is NOT optional.</em> This behavior differs from PHP
Markdown Extra.</p>
<p>If a colon ( <code>:</code> ) is at right of cell in 2nd line, the column is
right-aligned. If colons are at left and right, the column is center-aligned.</p>
<pre><code>|Name |Color |Number|
694e324b969d76dea39a1c14c8d6fe79
</code></pre>
<blockquote>
<table>
<thead><tr>
<th>Name</th>
<th style="text-align: center">Color</th>
<th style="text-align: right">Number</th>
</tr></thead>
<tbody>
<tr>
<td>Apple</td>
<td style="text-align: center">Red</td>
<td style="text-align: right">8</td>
</tr>
<tr>
<td>Mandarin</td>
<td style="text-align: center">Orange</td>
<td style="text-align: right">32</td>
</tr>
</tbody>
</table>
</blockquote>
<h3 id="bfheader-a3776b29531690e7f4f451f5bdcc2ea9">Difference from PHP Markdown Extra</h3>
<ul>
<li><p>At PHP Markdown Extra, a block-level html tag can be indented. But, at
BlueFeather, a block-level html tag CANNOT be indented. (same as original
Markdown)</p></li>
<li><p>PHP Markdown Extra doesn't emphasize this phrase.</p>
<pre><code>Please open the folder "secret_magic_box".
</code></pre>
<p>But, <em>BlueFeather emphasizes this phrase in this case.</em> (same as original
Markdown)</p></li>
<li><p>BlueFeather doesn't parse <a href="http://michelf.com/projects/php-markdown/extra/#markdown-attr">Markdown Inside HTML Blocks</a> and <a href="http://michelf.com/projects/php-markdown/extra/#abbr">Abbreviations</a>.</p></li>
<li><p>Left borders of table is NOT optional.</p></li>
</ul>
<h2 id="bfheader-4f4019ecdcaa30646c3630f3a3b8c9f3">BlueFeather Original</h2>
<h3 id="bfheader-6994206aa5146e62315e61b6ecf6f56b">TOC</h3>
<p><code>{toc}</code> at line head is substituted table of contents. (a list of headers)</p>
<pre><code>{toc}
</code></pre>
<blockquote>
<ul>
<li><a href="#bfheader-e94f9ae30ec0c63304942ba4d35482f1" rel="toc">From PHP Markdown Extra</a>
<ul>
<li><a href="#bfheader-ddab8aae0154722057b75219baf50923" rel="toc">Definition List (dl)</a></li>
<li><a href="#bfheader-8b213ded385c637758f8c3705eb6386a" rel="toc">Footnote</a></li>
<li><a href="#bfheader-e423def58198a19aa63d83b521d0f072" rel="toc">Header-id attribute</a></li>
<li><a href="#bfheader-b02dbf47a00cea8a287701a1624b9907" rel="toc">Fenced Code Block</a></li>
<li><a href="#bfheader-51c45b795d5d18a3e4e0c37e8b20a141" rel="toc">Table</a></li>
<li><a href="#bfheader-a3776b29531690e7f4f451f5bdcc2ea9" rel="toc">Difference from PHP Markdown Extra</a></li>
</ul></li>
<li><a href="#bfheader-4f4019ecdcaa30646c3630f3a3b8c9f3" rel="toc">BlueFeather Original</a>
<ul>
<li><a href="#bfheader-6994206aa5146e62315e61b6ecf6f56b" rel="toc">TOC</a></li>
<li><a href="#bfheader-8546ff2176bfead78c6ab1cb907ea60e" rel="toc">Block Separator</a></li>
</ul></li>
</ul>
</blockquote>
<p>You can specify to include levels of header.</p>
<pre><code>{toc:h3..}
</code></pre>
<blockquote>
<ul>
<li><a href="#bfheader-ddab8aae0154722057b75219baf50923" rel="toc">Definition List (dl)</a></li>
<li><a href="#bfheader-8b213ded385c637758f8c3705eb6386a" rel="toc">Footnote</a></li>
<li><a href="#bfheader-e423def58198a19aa63d83b521d0f072" rel="toc">Header-id attribute</a></li>
<li><a href="#bfheader-b02dbf47a00cea8a287701a1624b9907" rel="toc">Fenced Code Block</a></li>
<li><a href="#bfheader-51c45b795d5d18a3e4e0c37e8b20a141" rel="toc">Table</a></li>
<li><a href="#bfheader-a3776b29531690e7f4f451f5bdcc2ea9" rel="toc">Difference from PHP Markdown Extra</a></li>
<li><a href="#bfheader-6994206aa5146e62315e61b6ecf6f56b" rel="toc">TOC</a></li>
<li><a href="#bfheader-8546ff2176bfead78c6ab1cb907ea60e" rel="toc">Block Separator</a></li>
</ul>
</blockquote>
<p>Default is h2 - h6.</p>
<p>Following formats are usable to specify levels.</p>
<pre><code>{toc:h3-} (same as previous example)
{toc:h3} (h3 only)
{toc:h3..h4} (from h3 to h4)
{toc:..h4} (from h2 to h4)
</code></pre>
<p>Be careful, Headers <em>written by Markdown on the document root</em>, are only
included in TOC. So following headers are NOT included in TOC.</p>
<pre><code><h2>not included</h2>
> ## not included ##
</code></pre>
<h3 id="bfheader-8546ff2176bfead78c6ab1cb907ea60e">Block Separator</h3>
<p>Normally, two or more block-level elements (lists, code blocks, or others) are
combined even if a blank line splits them. But, the specification is bad in
that case.</p>
<pre><code>1. list1 item1
2. list1 item2
3. list1 item3
1. list2 item1
2. list2 item2
3. list2 item3
</code></pre>
<pre><code><ol>
<li>list1 item1</li>
<li>list1 item2</li>
<li><p>list1 item3</p></li>
<li><p>list2 item1</p></li>
<li>list2 item2</li>
<li>list2 item3</li>
</ol>
</code></pre>
<p>One way for the matter, to use horizontal line.</p>
<pre><code>1. list1 item1
2. list1 item2
3. list1 item3
----
1. list2 item1
2. list2 item2
3. list2 item3
</code></pre>
<pre><code><ol>
<li>list1 item1</li>
<li>list1 item2</li>
<li>list1 item3</li>
</ol>
<hr />
<ol>
<li>list2 item1</li>
<li>list2 item2</li>
<li>list2 item3</li>
</ol>
</code></pre>
<p>But, you might not want horizontal line in some cases. Because of the matter,
at BlueFeather, only one tilde symbol works as block separator.</p>
<pre><code>~
</code></pre>
<p>For example:</p>
<pre><code>1. list1 item1
2. list1 item2
3. list1 item3
~
1. list2 item1
2. list2 item2
3. list2 item3
</code></pre>
<pre><code><ol>
<li>list1 item1</li>
<li>list1 item2</li>
<li>list1 item3</li>
</ol>
<ol>
<li>list2 item1</li>
<li>list2 item2</li>
<li>list2 item3</li>
</ol>
</code></pre><div class="footnotes"><hr />
<ol>
<li id="footnote:1">
<p>And that's the footnote. <a href="#footnote-ref:1" rev="footnote">↩</a></p>
</li></ol>
</div>
</body>
</html>
|