jgarber / redcloth

RedCloth is a Ruby library for converting Textile into HTML.

redcloth / spec / fixtures / definitions.yml
100644 83 lines (77 sloc) 1.417 kb
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
name: redcloth definition list
in: |-
  here is a RedCloth definition list:
  
  - yes := no
  - no:=no
  - maybe:= yes
html: |-
  <p>here is a RedCloth definition list:</p>
  <dl>
   <dt>yes</dt>
   <dd>no</dd>
   <dt>no</dt>
   <dd>no</dd>
   <dt>maybe</dt>
   <dd>yes</dd>
  </dl>
---
name: with line breaks
in: |-
  - term := you can have line breaks
  just like other lists
  - line-spanning
  term := hey, slick!
html: |-
  <dl>
   <dt>term</dt>
   <dd>you can have line breaks<br />
  just like other lists</dd>
   <dt>line-spanning<br />
  term</dt>
   <dd>hey, slick!</dd>
  </dl>
---
name: double terms
in: |-
  You can have multiple terms before a definition:
 
  - textile
  - fabric
  - cloth := woven threads
html: |-
  <p>You can have multiple terms before a definition:</p>
  <dl>
   <dt>textile</dt>
   <dt>fabric</dt>
   <dt>cloth</dt>
   <dd>woven threads</dd>
  </dl>
---
name: not a definition list
desc: a definition list with no definitions is not a definition list
in: |-
  - textile
  - fabric
  - cloth
html: |-
  <p>- textile<br />
  - fabric<br />
  - cloth</p>
---
name: long definition list
in: |-
  here is a long definition
  
  - some term :=
  *sweet*
  
  yes
  
  ok =:
  - regular term := no
html: |-
  <p>here is a long definition</p>
  <dl>
   <dt>some term</dt>
   <dd><p><strong>sweet</strong></p>
  <p>yes</p>
  <p>ok</p></dd>
   <dt>regular term</dt>
   <dd>no</dd>
  </dl>