-
Notifications
You must be signed in to change notification settings - Fork 3
/
html.yaml
156 lines (142 loc) · 4.91 KB
/
html.yaml
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
HTML spans:
HTML spans:
desc: You can enclose a bit of text in an HTML span tag by enclosing it in percent
signs. Then you can apply attributes to the span (see "attributes":../attributes).
input: I can put in a %(myclass)span with a class% like this.
output: <p>I can put in a <span class="myclass">span with a class</span> like
this.</p>
Inline code:
Inline code:
desc: To mark code in your text, surround the code with at signs.
input: On the command line, you can just type @bash@.
output: <p>On the command line, you can just type <code>bash</code>.</p>
Block code:
Block code:
desc: You can insert a block of code with the @bc.@ block signature.
input: |-
bc. # Output "I love Ruby"
say = "I love Ruby"
puts say
output: |-
<pre><code># Output "I love Ruby"
say = "I love Ruby"
puts say</code></pre>
Extended block code:
desc: Use @bc..@ and the block of code will continue to include blank lines
until it encounters another block signature such as @p.@
input: |-
bc.. # Output "I love Ruby"
say = "I love Ruby"
puts say
# Output "I *LOVE* RUBY"
say['love'] = "*love*"
puts say.upcase
p. And that is how you do it.
output: |-
<pre><code># Output "I love Ruby"
say = "I love Ruby"
puts say</code>
<code># Output "I *LOVE* RUBY"
say['love'] = "*love*"
puts say.upcase</code></pre>
<p>And that is how you do it.</p>
Inline HTML:
Inline HTML:
desc: You can use HTML right in your paragraph text, presuming the site administrator
has not set :filter_html or :sanitize_html restrictions.
input: I can use HTML directly in my <span class="youbetcha">Textile</span>.
output: <p>I can use <span class="caps">HTML</span> directly in my <span class="youbetcha">Textile</span>.</p>
Block HTML:
Block HTML:
desc: You can use HTML freely within your Textile. HTML tags on a line
by themselves will not be mangled. Don't forget to leave a blank line
after any Textile, just like usual.
input: |-
<div id="shopping-cart">
<form action="form_action" method="get">
h3. Your cart
* Item one
* Item two
<p><input type="submit" value="Check Out" /></p>
</form>
</div>
output: |-
<div id="shopping-cart">
<form action="form_action" method="get">
<h3>Your cart</h3>
<ul>
<li>Item one</li>
<li>Item two</li>
</ul>
<p><input type="submit" value="Check Out" /></p>
</form>
</div>
No Textile:
No Textile:
desc: You can have Textile skip a chunk of text with the @<notextile>@ tag
or double-equals.
input: |-
<notextile>
Don't touch this!
</notextile>
Use ==*asterisks*== to say something *strongly*.
output: |-
Don't touch this!
<p>Use *asterisks* to say something <strong>strongly</strong>.</p>
Notextile block:
desc: Notextile can also be used as a normal or extended Textile block.
input: |-
notextile. This has *no* textile formatting, see?
notextile.. And this notextile block
Just keeps going and going.
p. Until you end it with another block.
output: |-
This has *no* textile formatting, see?
And this notextile block
Just keeps going and going.<p>Until you end it with another block.</p>
Preformatted text:
Preformatted text:
desc: Preformatted text can be put in a @pre.@ block and its whitespace will
be preserved. @pre.@ is almost identical to @bc.@, except that @<code>...</code>@
tags are not used within the @<pre>@ block.
input: |-
pre. Text in a pre block
is displayed in a fixed-width
font. It preserves
s p a c e s, line breaks
and ascii bunnies.
_ _
\`\ /`/
\ V /
/. .\
=\ T /=
/ ^ \
{}/\\ //\
__\ " " /__
(____/^\____)
output: |-
<pre> Text in a pre block
is displayed in a fixed-width
font. It preserves
s p a c e s, line breaks
and ascii bunnies.
_ _
\`\ /`/
\ V /
/. .\
=\ T /=
/ ^ \
{}/\\ //\
__\ " " /__
(____/^\____)</pre>
Extended preformatted:
desc: Use @pre..@ to make a block of extended preformatted text that continues
until it encounters another block signature, like @p.@
input: |-
pre.. All monospaced
Even the blank lines
p. But now a paragraph
output: |-
<pre>All monospaced</pre>
<pre>Even the blank lines</pre>
<p>But now a paragraph</p>