/
basic.yml
922 lines (890 loc) · 25.3 KB
/
basic.yml
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
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
---
name: paragraphs
desc: Textile looks for paragraphs in your text. Paragraphs are separated by one blank line. Every paragraph is translated as an HTML paragraph.
in: |-
A single paragraph.
Followed by another.
html: |-
<p>A single paragraph.</p>
<p>Followed by another.</p>
---
name: block containing block start
in: |-
I saw a ship. It ate my elephant.
html: |-
<p>I saw a ship. It ate my elephant.</p>
---
name: extended block containing block start
in: |-
p.. I saw a ship. It ate my elephant.
When the elephant comes to take a p. you...
html: |-
<p>I saw a ship. It ate my elephant.</p>
<p>When the elephant comes to take a p. you…</p>
---
name: blockquote containing block start
in: |-
bq. I saw a ship. It ate my elephant.
html: |-
<blockquote>
<p>I saw a ship. It ate my elephant.</p>
</blockquote>
---
name: extended blockquote containing block start
in: |-
bq.. I saw a ship. It ate my elephant.
When the elephant comes to take a p. you...
html: |-
<blockquote>
<p>I saw a ship. It ate my elephant.</p>
<p>When the elephant comes to take a p. you…</p>
</blockquote>
---
name: notextile block containing block start
in: |-
notextile. I saw a ship. It ate my elephant.
html: |-
I saw a ship. It ate my elephant.
valid_html: false
---
name: extended notextile block containing block start
in: |-
notextile.. I saw a ship. It ate my elephant.
When the elephant comes to take a p. you...
html: |-
I saw a ship. It ate my elephant.
When the elephant comes to take a p. you...
valid_html: false
---
name: pre block containing block start
in: |-
pre. I saw a ship. It ate my elephant.
html: |-
<pre>I saw a ship. It ate my elephant.</pre>
---
name: extended pre block containing block start
in: |-
pre.. I saw a ship. It ate my elephant.
When the elephant comes to take a p. you...
html: |-
<pre>I saw a ship. It ate my elephant.</pre>
<pre>When the elephant comes to take a p. you...</pre>
---
name: html tags
desc: You can certainly use HTML tags inside your Textile documents. HTML will only be escaped if it’s found in a <code>pre</code> or <code>code</code> block.
in: |-
I am <b>very</b> serious.
<pre>
I am <b>very</b> serious.
</pre>
html: |-
<p>I am <b>very</b> serious.</p>
<pre>
I am <b>very</b> serious.
</pre>
---
name: line breaks
desc: Line breaks are converted to HTML breaks.
in: |-
I spoke.
And none replied.
html: |-
<p>I spoke.<br />
And none replied.</p>
html_no_breaks: |-
<p>I spoke.
And none replied.</p>
lite_mode_html: |-
I spoke.<br />
And none replied.
---
name: curly quotes
desc: Single- and double-quotes around words or phrases are converted to curly quotations, much easier on the eye.
in: "\"Observe!\""
html: <p>“Observe!”</p>
---
name: quotes contained in multi-paragraph quotes
in: |-
"I first learned about this thing called "Redcloth" several years ago.
"It's wonderful."
html: |-
<p>“I first learned about this thing called “Redcloth” several years ago.</p>
<p>“It’s wonderful.”</p>
---
name: double hyphens
desc: Double hyphens are replaced with an em-dash.
in: Observe--very nice!
html: <p>Observe—very nice!</p>
latex: "Observe---very nice!\n\n"
---
name: double hyphens with spaces
desc: Double hyphens are replaced with an em-dash and surrounding spaces are preserved.
in: Observe -- very nice!
html: <p>Observe — very nice!</p>
latex: "Observe --- very nice!\n\n"
---
name: parenthetical phrase set off with em dashes
desc: Sentences with two em dashes should not turn them into strikethroughs
in: An emdash indicates a parenthetical thought--like this one--which is set apart from the rest of a sentence.
html: "<p>An emdash indicates a parenthetical thought—like this one—which is set apart from the rest of a sentence.</p>"
latex: "An emdash indicates a parenthetical thought---like this one---which is set apart from the rest of a sentence.\n\n"
---
name: parenthetical phrase set off with em dashes surrounded by spaces
desc: Sentences with two em dashes should not turn them into strikethroughs
in: An emdash indicates a parenthetical thought -- like this one -- which is set apart from the rest of a sentence.
html: "<p>An emdash indicates a parenthetical thought — like this one — which is set apart from the rest of a sentence.</p>"
latex: "An emdash indicates a parenthetical thought --- like this one --- which is set apart from the rest of a sentence.\n\n"
---
name: single hyphens with spaces
desc: Single hyphens are replaced with en-dashes if they are surrounded by spaces.
in: Observe - tiny and brief.
html: <p>Observe – tiny and brief.</p>
latex: "Observe--tiny and brief.\n\n"
---
name: midword hyphens
desc: Single hyphens are left alone if not surrounded by spaces.
in: Observe the nicely-done hyphen.
html: <p>Observe the nicely-done hyphen.</p>
---
name: ellipses
desc: Triplets of periods become an ellipsis.
in: Observe...
html: <p>Observe…</p>
lite_mode_html: Observe…
---
name: dimension sign
desc: The letter 'x' becomes a dimension sign when used between digits.
in: "Observe: 2x3."
html: "<p>Observe: 2×3.</p>"
---
name: dimension sign with space after
in: "The room is 2x3 inches big."
html: "<p>The room is 2×3 inches big.</p>"
---
name: dimension sign with spaces
in: "Observe: 2 x 4."
html: "<p>Observe: 2 × 4.</p>"
---
name: dimension signs chained
in: "Observe: 2x3x4."
html: "<p>Observe: 2×3×4.</p>"
lite_mode_html: "Observe: 2×3×4."
---
name: dimension signs with double primes
in: 'My mouse: 2.5" x 4".'
html: '<p>My mouse: 2.5″ × 4″.</p>'
---
name: dimension signs with single primes
in: "My office: 5' x 4.5'."
html: "<p>My office: 5′ × 4.5′.</p>"
---
name: trademark and copyright
desc: Conversion of trademark and copyright symbols.
in: one(TM), two(R), three(C).
html: <p>one™, two®, three©.</p>
lite_mode_html: one™, two®, three©.
---
name: headers
desc: To make an entire paragraph into a Header, place “h<em>n</em>.” at its beginning, where <em>n</em> is a number from 1-6.
in: h3. Header 3
html: <h3>Header 3</h3>
---
name: blockquote
desc: To make an entire paragraph into a block quotation, place “bq.” before it.
in: |-
Any old text
bq. A block quotation.
Any old text
html: |-
<p>Any old text</p>
<blockquote>
<p>A block quotation.</p>
</blockquote>
<p>Any old text</p>
---
name: footnote reference
desc: Numeric references within text to footnotes appear between square brackets.
in: This is covered elsewhere[1].
html: <p>This is covered elsewhere<sup class="footnote"><a href="#fn1">1</a></sup>.</p>
---
name: footnote
desc: To create the footnote that corresponds to its reference within the text, begin a new paragraph with fn and the footnote’s number, followed by a dot and a space.
in: fn1. Down here, in fact.
html: <p class="footnote" id="fn1"><sup>1</sup> Down here, in fact.</p>
---
name: em
desc: Emphasis to text is added by surrounding a phrase with underscores. In HTML, this often appears as <em>italics</em>.
in: I _believe_ every word.
html: <p>I <em>believe</em> every word.</p>
lite_mode_html: "I <em>believe</em> every word."
---
name: strong
desc: Strength can be give to text by surrounding with asterisks. In HTML, this strength appears as <strong>bold</strong>.
in: And then? She *fell*!
html: <p>And then? She <strong>fell</strong>!</p>
lite_mode_html: "And then? She <strong>fell</strong>!"
---
name: strong phrase beginning with a number
desc: A strong phrase at the beginning of a line that begins with a number should not be recognized as a ul with a start value (no such thing)
in: "*10 times as many*"
html: "<p><strong>10 times as many</strong></p>"
---
name: force bold italics
desc: Both italics and bold can be forced by doubling the underscores or asterisks.
in: |-
I __know__.
I **really** __know__.
html: |-
<p>I <i>know</i>.<br />
I <b>really</b> <i>know</i>.</p>
---
name: citation
desc: Use double question marks to indicate <em>citation</em>. The title of a book, for instance.
in: ??Cat's Cradle?? by Vonnegut
html: <p><cite>Cat’s Cradle</cite> by Vonnegut</p>
---
name: code phrases
desc: Code phrases can be surrounded by at-symbols.
in: Convert with @r.to_html@
html: <p>Convert with <code>r.to_html</code></p>
lite_mode_html: Convert with <code>r.to_html</code>
---
name: code phrases not created with multiple email addresses
in: Please email why@domain.com or jason@domain.com.
html: <p>Please email why@domain.com or jason@domain.com.</p>
---
name: del
desc: To indicate a passage which has been deleted, surround the passage with hypens.
in: I'm -sure- not sure.
html: <p>I’m <del>sure</del> not sure.</p>
---
name: ins
desc: Pluses around a passage indicate its insertion.
in: You are a +pleasant+ child.
html: <p>You are a <ins>pleasant</ins> child.</p>
---
name: superscript
desc: To superscript a phrase, surround with carets.
in: a ^2^ + b ^2^ = c ^2^
html: <p>a <sup>2</sup> + b <sup>2</sup> = c <sup>2</sup></p>
---
name: parenthetical superscript phrase
in: '^(image courtesy NASA)^'
html: '<p><sup>(image courtesy <span class="caps">NASA</span>)</sup></p>'
---
name: subscript
desc: To subscript, surround with tildes.
in: log ~2~ x
html: <p>log <sub>2</sub> x</p>
---
name: parenthetical subscript phrase
in: '~(image courtesy NASA)~'
html: '<p><sub>(image courtesy <span class="caps">NASA</span>)</sub></p>'
---
name: tight superscript and subscript
desc: if you want your superscript or subscript to not be surrounded by spaces, you must use square brackets
in: f(x, n) = log[~4~]x[^n^]
html: '<p>f(x, n) = log<sub>4</sub>x<sup>n</sup></p>'
---
name: span
desc: Lastly, if you find yourself needing to customize the style of a passage, use percent symbols to translate the passage as an HTML span.
in: I'm %unaware% of most soft drinks.
html: <p>I’m <span>unaware</span> of most soft drinks.</p>
---
name: style span
desc: This way, you can apply style settings, as described in the next section to arbitrary phrases.
in: |-
I'm %{color:red}unaware%
of most soft drinks.
html: |-
<p>I’m <span style="color:red;">unaware</span><br />
of most soft drinks.</p>
lite_mode_html: |-
I’m <span style="color:red;">unaware</span><br />
of most soft drinks.
---
name: percent sign
desc: though percent signs indicate a span, they shouldn't be overly greedy.
in: |-
http://blah.com/one%20two%20three
(min)5%-95%(max)
html: |-
<p>http://blah.com/one%20two%20three<br />
(min)5%-95%(max)</p>
---
name: css class
desc: A block can be tagged with a CSS class by circling the class in parentheses and placing it just before the period which marks the block.
in: p(example1). An example
html: <p class="example1">An example</p>
---
name: css id
desc: An element ID can be given by prefixing the ID with a pound symbol and using it in place of the class.
in: p(#big-red). Red here
html: <p id="big-red">Red here</p>
---
name: class and id combined
desc: Class and ID can be combined by placing the class first.
in: p(example1#big-red2). Red here
html: <p class="example1" id="big-red2">Red here</p>
---
name: css style
desc: Style settings can be provided directly by surrounding them in curly braces.
in: p{color:blue;margin:30px}. Spacey blue
html: <p style="color:blue;margin:30px;">Spacey blue</p>
---
name: language designations
desc: Language designations can be given between angel brackets.
in: p[fr]. rouge
html: <p lang="fr">rouge</p>
---
name: block attributes on phrase modifiers
desc: All block attributes can be applied to phrases as well by placing them just inside the opening modifier.
in: |-
I seriously *{color:red}blushed*
when I _(big)sprouted_ that
corn stalk from my
%[es]cabeza%.
html: |-
<p>I seriously <strong style="color:red;">blushed</strong><br />
when I <em class="big">sprouted</em> that<br />
corn stalk from my<br />
<span lang="es">cabeza</span>.</p>
---
name: inline attributes preceded by text are treated as literal
desc: modifiers must come first, without anything before them
in: |-
I *seriously {color:red}blushed*
when I _first (big)sprouted_ that
corn stalk from my
%grande [es]cabeza%.
html: |-
<p>I <strong>seriously {color:red}blushed</strong><br />
when I <em>first (big)sprouted</em> that<br />
corn stalk from my<br />
<span>grande [es]cabeza</span>.</p>
---
name: align justified
desc: Text inside blocks can be aligned in four basic ways.
in: p<>. justified
html: <p style="text-align:justify;">justified</p>
---
name: indentation
desc: Indentation can also be specified by provide a single left paren for every 1em to the left. A single right paren for every 1em to the right.
in: p))). right ident 3em
html: <p style="padding-right:3em;">right ident 3em</p>
---
name: indentation and alignment
desc: Identation may be coupled with alignment.
in: h2()>. Bingo.
html: <h2 style="padding-left:1em;padding-right:1em;text-align:right;">Bingo.</h2>
---
name: many modifiers combined
desc: And, furthermore, coupled with language settings and CSS styles.
in: h3()>[no]{color:red}. Bingo
html: <h3 style="padding-left:1em;padding-right:1em;text-align:right;color:red;" lang="no">Bingo</h3>
---
name: code blocks
desc: For example, long code blocks belong between <code>pre</code> and <code>code</code> tags. Please also indent your code inside the tags to be sure that all Textile processors out there will ignore the contents.
in: |
<pre>
<code>
a.gsub!( /</, '' )
</code>
</pre>
html: |-
<pre>
<code>
a.gsub!( /</, '' )
</code>
</pre>
---
name: div tags
desc: You may also choose to surround sections with <code>div</code> tags to separate your document into sections. <a href="http://www.instiki.org/">Instiki</a> uses this technique to float a sidebar to the right.
in: |
<div style="float:right;">
h3. Sidebar
"Hobix":http://hobix.com/
"Ruby":http://ruby-lang.org/
</div>
The main text of the page goes here and will stay to the left of the sidebar.
html: |-
<div style="float:right;">
<h3>Sidebar</h3>
<p><a href="http://hobix.com/">Hobix</a><br />
<a href="http://ruby-lang.org/">Ruby</a></p>
</div>
<p>The main text of the page goes here and will stay to the left of the sidebar.</p>
---
name: numbered list
desc: To make a numbered list, place each item in its own paragraph, preceded by ”#”.
in: |-
# A first item
# A second item
# A third
html: |-
<ol>
<li>A first item</li>
<li>A second item</li>
<li>A third</li>
</ol>
---
name: nested numbered lists
desc: These lists may be nested by increasing the number of pound symbols preceding child entries.
in: |-
# Fuel could be:
## Coal
## Gasoline
## Electricity
# Humans need only:
## Water
## Protein
html: |-
<ol>
<li>Fuel could be:
<ol>
<li>Coal</li>
<li>Gasoline</li>
<li>Electricity</li>
</ol></li>
<li>Humans need only:
<ol>
<li>Water</li>
<li>Protein</li>
</ol></li>
</ol>
---
name: bulleted list
desc: Bulleted lists use an asterisk in place of the pound.
in: |-
* A first item
* A second item
* A third
html: |-
<ul>
<li>A first item</li>
<li>A second item</li>
<li>A third</li>
</ul>
---
name: nested bulleted lists
desc: These lists may be nested in like manner.
in: |-
* Fuel could be:
** Coal
** Gasoline
** Electricity
* Humans need only:
** Water
** Protein
html: |-
<ul>
<li>Fuel could be:
<ul>
<li>Coal</li>
<li>Gasoline</li>
<li>Electricity</li>
</ul></li>
<li>Humans need only:
<ul>
<li>Water</li>
<li>Protein</li>
</ul></li>
</ul>
---
name: links
desc: Basic links are comprised of a phrase which is linked to a <acronym title="Universal Resource Locator">URL</acronym>. Place the descriptive phrase in quotation marks. Follow it immediately by a colon and the URL.
in: I searched "Google":http://google.com.
html: <p>I searched <a href="http://google.com">Google</a>.</p>
lite_mode_html: I searched <a href="http://google.com">Google</a>.
---
name: link aliases
desc: If you are using the same link several times in your document, or you’d just like to be a tad more organized, you can use a link alias. Place the URL anywhere in your document, beginning with its alias in square brackets. Then, use the alias in place of the URL, using the link format above.
in: |-
I am crazy about "Hobix":hobix
and "it's":hobix "all":hobix I ever
"link to":hobix!
[hobix]http://hobix.com
html: |-
<p>I am crazy about <a href="http://hobix.com">Hobix</a><br />
and <a href="http://hobix.com">it’s</a> <a href="http://hobix.com">all</a> I ever<br />
<a href="http://hobix.com">link to</a>!</p>
---
name: image
desc: You can embed an image in your Textile document by surrounding its URL with exclamation marks.
in: "!http://hobix.com/sample.jpg!"
html: <p><img src="http://hobix.com/sample.jpg" alt="" /></p>
lite_mode_html: <img src="http://hobix.com/sample.jpg" alt="" />
---
name: image title
desc: A title for the image can also be provided in parens, just before the closing exclamation.
in: "!openwindow1.gif(Bunny.)!"
html: <p><img src="openwindow1.gif" title="Bunny." alt="Bunny." /></p>
---
name: image links
desc: Links can be attached to images with a colon.
in: "!openwindow1.gif!:http://hobix.com/"
html: <p><a href="http://hobix.com/"><img src="openwindow1.gif" alt="" /></a></p>
---
name: image alignments
desc: Alignments can be applied as well to images.
in: |-
!>obake.gif!
And others sat all round the small
machine and paid it to sing to them.
html: |-
<p style="float:right;"><img src="obake.gif" alt="" /></p>
<p>And others sat all round the small<br />
machine and paid it to sing to them.</p>
---
name: acronym definitions
desc: Definitions for acronyms can be provided by following an acronym with its definition in parens.
in: We use CSS(Cascading Style Sheets).
html: <p>We use <acronym title="Cascading Style Sheets"><span class="caps">CSS</span></acronym>.</p>
lite_mode_html: We use <acronym title="Cascading Style Sheets"><span class="caps">CSS</span></acronym>.
no_span_caps_html: <p>We use <acronym title="Cascading Style Sheets">CSS</acronym>.</p>
---
name: tables
desc: Simple tables can be built by separating fields with pipe characters
in: |-
| name | age | sex |
| joan | 24 | f |
| archie | 29 | m |
| bella | 45 | f |
html: |-
<table>
<tr>
<td> name </td>
<td> age </td>
<td> sex </td>
</tr>
<tr>
<td> joan </td>
<td> 24 </td>
<td> f </td>
</tr>
<tr>
<td> archie </td>
<td> 29 </td>
<td> m </td>
</tr>
<tr>
<td> bella </td>
<td> 45 </td>
<td> f </td>
</tr>
</table>
---
name: table headers
desc: Specify header cells by marking them with an underscore and period.
in: |-
|_. name |_. age |_. sex |
| joan | 24 | f |
| archie | 29 | m |
| bella | 45 | f |
html: |-
<table>
<tr>
<th>name </th>
<th>age </th>
<th>sex </th>
</tr>
<tr>
<td> joan </td>
<td> 24 </td>
<td> f </td>
</tr>
<tr>
<td> archie </td>
<td> 29 </td>
<td> m </td>
</tr>
<tr>
<td> bella </td>
<td> 45 </td>
<td> f </td>
</tr>
</table>
---
name: table cell attributes
desc: The period used above marks the end of a cell’s attributes. Other attributes can be applied as well.
in: |-
|_. attribute list |
|<. align left |
|>. align right|
|=. center |
|<>. justify |
|^. valign top |
|~. bottom |
html: |-
<table>
<tr>
<th>attribute list </th>
</tr>
<tr>
<td style="text-align:left;">align left </td>
</tr>
<tr>
<td style="text-align:right;">align right</td>
</tr>
<tr>
<td style="text-align:center;">center </td>
</tr>
<tr>
<td style="text-align:justify;">justify </td>
</tr>
<tr>
<td style="vertical-align:top;">valign top </td>
</tr>
<tr>
<td style="vertical-align:bottom;">bottom </td>
</tr>
</table>
---
name: table colspan
desc: You can also specify colspans with a backslash, followed by the cell width.
in: |-
|\2. spans two cols |
| col 1 | col 2 |
html: |-
<table>
<tr>
<td colspan="2">spans two cols </td>
</tr>
<tr>
<td> col 1 </td>
<td> col 2 </td>
</tr>
</table>
---
name: table rowspan
desc: Rowspan is specified by a forward slash, followed by the row height.
in: |-
|/3. spans 3 rows | a |
| b |
| c |
html: |-
<table>
<tr>
<td rowspan="3">spans 3 rows </td>
<td> a </td>
</tr>
<tr>
<td> b </td>
</tr>
<tr>
<td> c </td>
</tr>
</table>
---
name: block attributes applied to table cells
desc: All block attributes can be applied to table cells as well.
in: "|{background:#ddd}. Grey cell|"
html: |-
<table>
<tr>
<td style="background:#ddd;">Grey cell</td>
</tr>
</table>
---
name: black attributes applied to a table
desc: Table-wide attributes can be applied before the first row of the table. On its own line, followed by a period.
in: |-
table{border:1px solid black}.
|This|is|a|row|
|This|is|a|row|
html: |-
<table style="border:1px solid black;">
<tr>
<td>This</td>
<td>is</td>
<td>a</td>
<td>row</td>
</tr>
<tr>
<td>This</td>
<td>is</td>
<td>a</td>
<td>row</td>
</tr>
</table>
---
name: black attributes applied to a table row
desc: Attributes can be applied to a single row by supplying the attribute before the row starts, using a <code>table</code> modifier and following it by a period.
in: |-
|This|is|a|row|
{background:#ddd}. |This|is|grey|row|
html: |-
<table>
<tr>
<td>This</td>
<td>is</td>
<td>a</td>
<td>row</td>
</tr>
<tr style="background:#ddd;">
<td>This</td>
<td>is</td>
<td>grey</td>
<td>row</td>
</tr>
</table>
---
name: extended block followed by pre block
in: |-
div.. Just a test.
Second div.
pre. A pre block ends it.
html: |-
<div>Just a test.</div>
<div>Second div.</div>
<pre>A pre block ends it.</pre>
---
name: extended block followed by blockquote
in: |-
div.. Just a test.
Second div.
bq. A blockquote ends it.
html: |-
<div>Just a test.</div>
<div>Second div.</div>
<blockquote>
<p>A blockquote ends it.</p>
</blockquote>
---
name: extended block followed by block code
in: |-
div.. Just a test.
Second div.
bc. A blockcode ends it.
html: |-
<div>Just a test.</div>
<div>Second div.</div>
<pre><code>A blockcode ends it.</code></pre>
---
name: extended block followed by notextile block
in: |-
div.. Just a test.
Second div.
notextile. A notextile block ends it.
html: |-
<div>Just a test.</div>
<div>Second div.</div>
A notextile block ends it.
valid_html: false
---
name: simple parentheses
in: |-
before (in parens) after
html: |-
<p>before (in parens) after</p>
---
name: parentheses in underscores
in: |-
before _(in parens)_ after
html: |-
<p>before <em>(in parens)</em> after</p>
---
name: parentheses in asterisks
in: |-
before *(in parens)* after
html: |-
<p>before <strong>(in parens)</strong> after</p>
---
name: parentheses in underscores in quotes
in: |-
"before _(in parens)_ after"
html: |-
<p>“before <em>(in parens)</em> after”</p>
---
name: underscores in parentheses
in: |-
one _two three_ (four _five six_) seven
html: |-
<p>one <em>two three</em> (four <em>five six</em>) seven</p>
---
name: underscores in parentheses in quotes
in: |-
"one _two three_ (four _five six_) seven"
html: |-
<p>“one <em>two three</em> (four <em>five six</em>) seven”</p>
---
name: underscores in parentheses 2
in: |-
one (two _three four_) five
html: |-
<p>one (two <em>three four</em>) five</p>
---
name: underscores in parentheses in quotes 2
in: |-
"one (two _three four_) five"
html: |-
<p>“one (two <em>three four</em>) five”</p>
---
name: caps in parentheses
desc: Uppercase words of three or more characters that are in parentheses should be recognized as well as those not in parentheses.
in: IBM or (HAL)
html: <p><span class="caps">IBM</span> or (<span class="caps">HAL</span>)</p>
no_span_caps_html: <p>IBM or (HAL)</p>
---
name: phrase modifiers in parentheses
desc: Inline modifiers are expected to work in parentheses as well.
in: |-
__Amanita__s are mushrooms.
Lungworts (__Lobaria__) are lichens.
Blah blah (normal text **bold**) blah.
html: |-
<p>__Amanita__s are mushrooms.<br />
Lungworts (<i>Lobaria</i>) are lichens.<br />
Blah blah (normal text <b>bold</b>) blah.</p>
---
name: square brackets are preserved
in: |-
citation ["(Berk.) Hilton"], see
[Papers "blah blah."]
html: |-
<p>citation [“(Berk.) Hilton”], see<br />
[Papers “blah blah.”]</p>
---
name: horizontal rule using asterisks
in: |-
Just some *** text
***
Some more text.
html: |-
<p>Just some <strong>*</strong> text</p>
<hr />
<p>Some more text.</p>
---
name: horizontal rule using more than three asterisks
in: |-
Just some **** text
****
Some more text.
html: |-
<p>Just some **** text</p>
<hr />
<p>Some more text.</p>
---
name: horizontal rule using dashes
in: |-
Just some --- text
---
Some more text.
html: |-
<p>Just some <del>-</del> text</p>
<hr />
<p>Some more text.</p>
---
name: horizontal rule using underscores
in: |-
Just some ___ text
___
Some more text.
html: |-
<p>Just some <em>_</em> text</p>
<hr />
<p>Some more text.</p>
---
name: lang attribute cannot contain square brackets
in: "some @[[code]]@"
html: "<p>some <code>[[code]]</code></p>"