pink_shirt 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/Readme.txt +26 -0
- data/lib/pink_shirt/attributes.rb +169 -0
- data/lib/pink_shirt/entities.rb +32 -0
- data/lib/pink_shirt/flags.rb +5 -0
- data/lib/pink_shirt/output.rb +64 -0
- data/lib/pink_shirt/sax/acronym.rb +15 -0
- data/lib/pink_shirt/sax/base.rb +20 -0
- data/lib/pink_shirt/sax/basic.rb +114 -0
- data/lib/pink_shirt/sax/block_level.rb +69 -0
- data/lib/pink_shirt/sax/boiler_plate.rb +11 -0
- data/lib/pink_shirt/sax/images.rb +17 -0
- data/lib/pink_shirt/sax/links.rb +19 -0
- data/lib/pink_shirt/sax/lists.rb +67 -0
- data/lib/pink_shirt/sax/preformatted.rb +13 -0
- data/lib/pink_shirt/sax/script.rb +12 -0
- data/lib/pink_shirt/sax/tables.rb +38 -0
- data/lib/pink_shirt/sax.rb +75 -0
- data/lib/pink_shirt/version.rb +3 -0
- data/lib/pink_shirt.rb +49 -0
- data/pink_shirt.gemspec +25 -0
- data/spec/basics_spec.rb +16 -0
- data/spec/examples/basics.yaml +172 -0
- data/spec/reverse_redcloth_spec.rb +17 -0
- data/spec/reverse_textile_spec.rb +65 -0
- data/spec/spec_helper.rb +3 -0
- data/spec/textile-spec/CHANGELOG +6 -0
- data/spec/textile-spec/README.textile +55 -0
- data/spec/textile-spec/attributes.yaml +58 -0
- data/spec/textile-spec/html.yaml +156 -0
- data/spec/textile-spec/index.yaml +12 -0
- data/spec/textile-spec/page_layout.yaml +276 -0
- data/spec/textile-spec/paragraph_text.yaml +131 -0
- data/spec/textile-spec/phrase_modifiers.yaml +125 -0
- data/spec/textile_spec.rb +113 -0
- metadata +130 -0
@@ -0,0 +1,156 @@
|
|
1
|
+
HTML spans:
|
2
|
+
HTML spans:
|
3
|
+
desc: You can enclose a bit of text in an HTML span tag by enclosing it in percent
|
4
|
+
signs. Then you can apply attributes to the span (see "attributes":../attributes).
|
5
|
+
input: I can put in a %(myclass)span with a class% like this.
|
6
|
+
output: <p>I can put in a <span class="myclass">span with a class</span> like
|
7
|
+
this.</p>
|
8
|
+
Inline code:
|
9
|
+
Inline code:
|
10
|
+
desc: To mark code in your text, surround the code with at signs.
|
11
|
+
input: On the command line, you can just type @bash@.
|
12
|
+
output: <p>On the command line, you can just type <code>bash</code>.</p>
|
13
|
+
#Block code:
|
14
|
+
# Block code:
|
15
|
+
# desc: You can insert a block of code with the @bc.@ block signature.
|
16
|
+
# input: |-
|
17
|
+
# bc. # Output "I love Ruby"
|
18
|
+
# say = "I love Ruby"
|
19
|
+
# puts say
|
20
|
+
# output: |-
|
21
|
+
# <pre><code># Output "I love Ruby"
|
22
|
+
# say = "I love Ruby"
|
23
|
+
# puts say</code></pre>
|
24
|
+
# Extended block code:
|
25
|
+
# desc: Use @bc..@ and the block of code will continue to include blank lines
|
26
|
+
# until it encounters another block signature such as @p.@
|
27
|
+
# input: |-
|
28
|
+
# bc.. # Output "I love Ruby"
|
29
|
+
# say = "I love Ruby"
|
30
|
+
# puts say
|
31
|
+
|
32
|
+
# # Output "I *LOVE* RUBY"
|
33
|
+
# say['love'] = "*love*"
|
34
|
+
# puts say.upcase
|
35
|
+
|
36
|
+
# p. And that is how you do it.
|
37
|
+
# output: |-
|
38
|
+
# <pre><code># Output "I love Ruby"
|
39
|
+
# say = "I love Ruby"
|
40
|
+
# puts say</code>
|
41
|
+
|
42
|
+
# <code># Output "I *LOVE* RUBY"
|
43
|
+
# say['love'] = "*love*"
|
44
|
+
# puts say.upcase</code></pre>
|
45
|
+
# <p>And that is how you do it.</p>
|
46
|
+
# Inline HTML:
|
47
|
+
# Inline HTML:
|
48
|
+
# desc: You can use HTML right in your paragraph text, presuming the site administrator
|
49
|
+
# has not set :filter_html or :sanitize_html restrictions.
|
50
|
+
# input: I can use HTML directly in my <span class="youbetcha">Textile</span>.
|
51
|
+
# output: <p>I can use <span class="caps">HTML</span> directly in my <span class="youbetcha">Textile</span>.</p>
|
52
|
+
# Block HTML:
|
53
|
+
# Block HTML:
|
54
|
+
# desc: You can use HTML freely within your Textile. HTML tags on a line
|
55
|
+
# by themselves will not be mangled. Don't forget to leave a blank line
|
56
|
+
# after any Textile, just like usual.
|
57
|
+
# input: |-
|
58
|
+
# <div id="shopping-cart">
|
59
|
+
# <form action="form_action" method="get">
|
60
|
+
# h3. Your cart
|
61
|
+
|
62
|
+
# * Item one
|
63
|
+
# * Item two
|
64
|
+
|
65
|
+
# <p><input type="submit" value="Check Out" /></p>
|
66
|
+
|
67
|
+
# </form>
|
68
|
+
# </div>
|
69
|
+
# output: |-
|
70
|
+
# <div id="shopping-cart">
|
71
|
+
# <form action="form_action" method="get">
|
72
|
+
# <h3>Your cart</h3>
|
73
|
+
# <ul>
|
74
|
+
# <li>Item one</li>
|
75
|
+
# <li>Item two</li>
|
76
|
+
# </ul>
|
77
|
+
# <p><input type="submit" value="Check Out" /></p>
|
78
|
+
# </form>
|
79
|
+
# </div>
|
80
|
+
# No Textile:
|
81
|
+
# No Textile:
|
82
|
+
# desc: You can have Textile skip a chunk of text with the @<notextile>@ tag
|
83
|
+
# or double-equals.
|
84
|
+
# input: |-
|
85
|
+
# <notextile>
|
86
|
+
# Don't touch this!
|
87
|
+
# </notextile>
|
88
|
+
|
89
|
+
# Use ==*asterisks*== to say something *strongly*.
|
90
|
+
# output: |-
|
91
|
+
# Don't touch this!
|
92
|
+
# <p>Use *asterisks* to say something <strong>strongly</strong>.</p>
|
93
|
+
# Notextile block:
|
94
|
+
# desc: Notextile can also be used as a normal or extended Textile block.
|
95
|
+
# input: |-
|
96
|
+
# notextile. This has *no* textile formatting, see?
|
97
|
+
|
98
|
+
# notextile.. And this notextile block
|
99
|
+
|
100
|
+
# Just keeps going and going.
|
101
|
+
|
102
|
+
# p. Until you end it with another block.
|
103
|
+
# output: |-
|
104
|
+
# This has *no* textile formatting, see?
|
105
|
+
|
106
|
+
# And this notextile block
|
107
|
+
|
108
|
+
# Just keeps going and going.<p>Until you end it with another block.</p>
|
109
|
+
Preformatted text:
|
110
|
+
Preformatted text:
|
111
|
+
desc: Preformatted text can be put in a @pre.@ block and its whitespace will
|
112
|
+
be preserved. @pre.@ is almost identical to @bc.@, except that @<code>...</code>@
|
113
|
+
tags are not used within the @<pre>@ block.
|
114
|
+
input: |-
|
115
|
+
pre. Text in a pre block
|
116
|
+
is displayed in a fixed-width
|
117
|
+
font. It preserves
|
118
|
+
s p a c e s, line breaks
|
119
|
+
and ascii bunnies.
|
120
|
+
_ _
|
121
|
+
\`\ /`/
|
122
|
+
\ V /
|
123
|
+
/. .\
|
124
|
+
=\ T /=
|
125
|
+
/ ^ \
|
126
|
+
{}/\\ //\
|
127
|
+
__\ " " /__
|
128
|
+
(____/^\____)
|
129
|
+
output: |-
|
130
|
+
<pre> Text in a pre block
|
131
|
+
is displayed in a fixed-width
|
132
|
+
font. It preserves
|
133
|
+
s p a c e s, line breaks
|
134
|
+
and ascii bunnies.
|
135
|
+
_ _
|
136
|
+
\`\ /`/
|
137
|
+
\ V /
|
138
|
+
/. .\
|
139
|
+
=\ T /=
|
140
|
+
/ ^ \
|
141
|
+
{}/\\ //\
|
142
|
+
__\ " " /__
|
143
|
+
(____/^\____)</pre>
|
144
|
+
# Extended preformatted:
|
145
|
+
# desc: Use @pre..@ to make a block of extended preformatted text that continues
|
146
|
+
# until it encounters another block signature, like @p.@
|
147
|
+
# input: |-
|
148
|
+
# pre.. All monospaced
|
149
|
+
|
150
|
+
# Even the blank lines
|
151
|
+
|
152
|
+
# p. But now a paragraph
|
153
|
+
# output: |-
|
154
|
+
# <pre>All monospaced</pre>
|
155
|
+
# <pre>Even the blank lines</pre>
|
156
|
+
# <p>But now a paragraph</p>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
:version: 0.0.1
|
2
|
+
:specs:
|
3
|
+
Writing Paragraph Text:
|
4
|
+
file: paragraph_text.yaml
|
5
|
+
Page Layout:
|
6
|
+
file: page_layout.yaml
|
7
|
+
Phrase modifiers:
|
8
|
+
file: phrase_modifiers.yaml
|
9
|
+
Attributes:
|
10
|
+
file: attributes.yaml
|
11
|
+
HTML Integration and Escapement:
|
12
|
+
file: html.yaml
|
@@ -0,0 +1,276 @@
|
|
1
|
+
Headings:
|
2
|
+
Headings:
|
3
|
+
desc: Headings convey a hierarchy of information on the page. They structure
|
4
|
+
the document like an outline. Heading 1 is the most important or general and
|
5
|
+
Heading 6 is the least important or most specific. Leave a blank line after
|
6
|
+
every heading.
|
7
|
+
input: |-
|
8
|
+
h1. This is a Heading 1
|
9
|
+
|
10
|
+
This might be an introductory paragraph on the general topic.
|
11
|
+
|
12
|
+
h2. Heading 2 gets more specific
|
13
|
+
|
14
|
+
Now we're getting into the details.
|
15
|
+
output: |-
|
16
|
+
<h1>This is a Heading 1</h1>
|
17
|
+
<p>This might be an introductory paragraph on the general topic.</p>
|
18
|
+
<h2>Heading 2 gets more specific</h2>
|
19
|
+
<p>Now we’re getting into the details.</p>
|
20
|
+
Block quotations:
|
21
|
+
Block quotations:
|
22
|
+
desc: Block quotations designate long quotations where a paragraph break is
|
23
|
+
appropriate. It ends with a blank line.
|
24
|
+
input: |-
|
25
|
+
Even Mr. Sedaris, a noted luddite, has finally succumbed to doing his writing on a computer. The Internet, however, remains an idiotic trifle:
|
26
|
+
|
27
|
+
bq. I've never seen the Internet. I don't have email. I just enjoy lying on the couch and reading a magazine. When people say, "You should visit my Web page," I'm always perplexed by it. Why? What do you do there?
|
28
|
+
|
29
|
+
Haven't we all pondered that at one time or another?
|
30
|
+
output: |-
|
31
|
+
<p>Even Mr. Sedaris, a noted luddite, has finally succumbed to doing his writing on a computer. The Internet, however, remains an idiotic trifle:</p>
|
32
|
+
<blockquote>
|
33
|
+
<p>I’ve never seen the Internet. I don’t have email. I just enjoy lying on the couch and reading a magazine. When people say, “You should visit my Web page,” I’m always perplexed by it. Why? What do you do there?</p>
|
34
|
+
</blockquote>
|
35
|
+
<p>Haven’t we all pondered that at one time or another?</p>
|
36
|
+
Citing block quotations:
|
37
|
+
desc: Block quotations may include a citation URL(Uniform Resource Locator)
|
38
|
+
immediately following the period.
|
39
|
+
input: |-
|
40
|
+
A standard Lorem Ipsum passage has been used since the 1500s:
|
41
|
+
|
42
|
+
bq.:http://www.lipsum.com/ Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
43
|
+
output: |-
|
44
|
+
<p>A standard Lorem Ipsum passage has been used since the 1500s:</p>
|
45
|
+
<blockquote cite="http://www.lipsum.com/">
|
46
|
+
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
|
47
|
+
</blockquote>
|
48
|
+
# Extended block quotations:
|
49
|
+
# desc: If your block quotation needs to go on for more than one paragraph, use
|
50
|
+
# two periods. The block quotation ends when a paragraph of a different type
|
51
|
+
# (such as an explicit paragraph or a header) is encountered.
|
52
|
+
# input: |-
|
53
|
+
# bq.. This is one paragraph.
|
54
|
+
|
55
|
+
# Another paragraph, also part of the quote.
|
56
|
+
|
57
|
+
# p. A normal paragraph ends the quote.
|
58
|
+
# output: |-
|
59
|
+
# <blockquote>
|
60
|
+
# <p>This is one paragraph.</p>
|
61
|
+
# <p>Another paragraph, also part of the quote.</p>
|
62
|
+
# </blockquote>
|
63
|
+
# <p>A normal paragraph ends the quote.</p>
|
64
|
+
Bullet lists:
|
65
|
+
Bullet lists:
|
66
|
+
desc: Make a bullet list with asterisks. Use more asterisks to make nested
|
67
|
+
lists.
|
68
|
+
input: |-
|
69
|
+
Textile has several advantages over HTML:
|
70
|
+
|
71
|
+
* It's easier on the eyes
|
72
|
+
* You don't have to write all those HTML tags
|
73
|
+
** By not writing the tags yourself, you're less likely to make coding mistakes
|
74
|
+
** It requires fewer keystrokes
|
75
|
+
*** You don't wear out the keys on your keyboard as fast
|
76
|
+
*** You won't wear out your fingers as fast
|
77
|
+
* You can write it much quicker
|
78
|
+
output: |-
|
79
|
+
<p>Textile has several advantages over <span class="caps">HTML</span>:</p>
|
80
|
+
<ul>
|
81
|
+
<li>It’s easier on the eyes</li>
|
82
|
+
<li>You don’t have to write all those <span class="caps">HTML</span> tags
|
83
|
+
<ul>
|
84
|
+
<li>By not writing the tags yourself, you’re less likely to make coding mistakes</li>
|
85
|
+
<li>It requires fewer keystrokes
|
86
|
+
<ul>
|
87
|
+
<li>You don’t wear out the keys on your keyboard as fast</li>
|
88
|
+
<li>You won’t wear out your fingers as fast</li>
|
89
|
+
</ul></li>
|
90
|
+
</ul></li>
|
91
|
+
<li>You can write it much quicker</li>
|
92
|
+
</ul>
|
93
|
+
Numbered lists:
|
94
|
+
Numbered lists:
|
95
|
+
desc: Start each item in your numbered list with a number sign. For nested
|
96
|
+
lists, use more number signs.
|
97
|
+
input: |-
|
98
|
+
How to make a PB&J:
|
99
|
+
|
100
|
+
# Gather bread, peanut butter, and jelly
|
101
|
+
# Slice the bread if necessary
|
102
|
+
# Assemble the sandwich
|
103
|
+
## Spread peanut butter on one slice of bread
|
104
|
+
## Put jelly on another slice
|
105
|
+
## Put the two slices together
|
106
|
+
# Enjoy
|
107
|
+
output: |-
|
108
|
+
<p>How to make a PB&J:</p>
|
109
|
+
<ol>
|
110
|
+
<li>Gather bread, peanut butter, and jelly</li>
|
111
|
+
<li>Slice the bread if necessary</li>
|
112
|
+
<li>Assemble the sandwich
|
113
|
+
<ol>
|
114
|
+
<li>Spread peanut butter on one slice of bread</li>
|
115
|
+
<li>Put jelly on another slice</li>
|
116
|
+
<li>Put the two slices together</li>
|
117
|
+
</ol></li>
|
118
|
+
<li>Enjoy</li>
|
119
|
+
</ol>
|
120
|
+
Mixed nested lists:
|
121
|
+
Mixed nested lists:
|
122
|
+
desc: You can nest ordered lists inside unordered lists and vice-versa.
|
123
|
+
input: |-
|
124
|
+
Three reasons to walk to work:
|
125
|
+
|
126
|
+
# It saves fuel
|
127
|
+
# It's good for your health
|
128
|
+
** Walking burns calories
|
129
|
+
** Time outside means lower stress
|
130
|
+
# It's good for the environment
|
131
|
+
output: |-
|
132
|
+
<p>Three reasons to walk to work:</p>
|
133
|
+
<ol>
|
134
|
+
<li>It saves fuel</li>
|
135
|
+
<li>It’s good for your health
|
136
|
+
<ul>
|
137
|
+
<li>Walking burns calories</li>
|
138
|
+
<li>Time outside means lower stress</li>
|
139
|
+
</ul></li>
|
140
|
+
<li>It’s good for the environment</li>
|
141
|
+
</ol>
|
142
|
+
Definition lists:
|
143
|
+
Definition lists:
|
144
|
+
desc: Each term in a definition list starts with a dash. Put a @:=@ between
|
145
|
+
the term and the definition. If your definition spans multiple lines, end
|
146
|
+
the definition with @=:@
|
147
|
+
input: |-
|
148
|
+
- coffee := Hot and black
|
149
|
+
- tea := Also hot, but a little less black
|
150
|
+
- milk := Nourishing beverage for baby cows.
|
151
|
+
output: |-
|
152
|
+
<dl>
|
153
|
+
<dt>coffee</dt>
|
154
|
+
<dd>Hot and black</dd>
|
155
|
+
<dt>tea</dt>
|
156
|
+
<dd>Also hot, but a little less black</dd>
|
157
|
+
<dt>milk</dt>
|
158
|
+
<dd><p>Nourishing beverage for baby cows.</dd>
|
159
|
+
</dl>
|
160
|
+
# Definition lists with marked up insides:
|
161
|
+
# desc: Each term in a definition list starts with a dash. Put a @:=@ between
|
162
|
+
# the term and the definition. If your definition spans multiple lines, end
|
163
|
+
# the definition with @=:@
|
164
|
+
# input: |-
|
165
|
+
# - coffee := Hot and black
|
166
|
+
# - tea := Also hot, but a little less black
|
167
|
+
# - milk :=
|
168
|
+
# Nourishing beverage for baby cows.
|
169
|
+
|
170
|
+
# Cold drink that goes great with cookies. =:
|
171
|
+
# output: |-
|
172
|
+
# <dl>
|
173
|
+
# <dt>coffee</dt>
|
174
|
+
# <dd>Hot and black</dd>
|
175
|
+
# <dt>tea</dt>
|
176
|
+
# <dd>Also hot, but a little less black</dd>
|
177
|
+
# <dt>milk</dt>
|
178
|
+
# <dd><p>Nourishing beverage for baby cows.</p>
|
179
|
+
# <p>Cold drink that goes great with cookies.</p></dd>
|
180
|
+
# </dl>
|
181
|
+
# Footnotes:
|
182
|
+
# Footnotes:
|
183
|
+
# desc: To reference a footnote, place the footnote number in square brackets.
|
184
|
+
# Don't forget the corresponding footnote at the bottom of the page.
|
185
|
+
# input: |-
|
186
|
+
# 42.7% of all statistics are made up on the spot.[1]
|
187
|
+
|
188
|
+
# fn1. "Dr. Katz":http://en.wikiquote.org/wiki/Steven_Wright
|
189
|
+
# output: |-
|
190
|
+
# <p>42.7% of all statistics are made up on the spot.<sup class="footnote" id="fnr1"><a href="#fn1">1</a></sup></p>
|
191
|
+
# <p class="footnote" id="fn1"><a href="#fnr1"><sup>1</sup></a> <a href="http://en.wikiquote.org/wiki/Steven_Wright">Dr. Katz</a></p>
|
192
|
+
Tables:
|
193
|
+
Tables:
|
194
|
+
desc: Simple tables are made by separating each cell with vertical pipes. Begin
|
195
|
+
the cell with @_.@ to indicate the cell is a heading.
|
196
|
+
input: |-
|
197
|
+
|_. name|_. age|
|
198
|
+
|Walter|5|
|
199
|
+
|Florence|6|
|
200
|
+
output: |-
|
201
|
+
<table>
|
202
|
+
<tr>
|
203
|
+
<th>name</th>
|
204
|
+
<th>age</th>
|
205
|
+
</tr>
|
206
|
+
<tr>
|
207
|
+
<td>Walter</td>
|
208
|
+
<td>5</td>
|
209
|
+
</tr>
|
210
|
+
<tr>
|
211
|
+
<td>Florence</td>
|
212
|
+
<td>6</td>
|
213
|
+
</tr>
|
214
|
+
</table>
|
215
|
+
Table cell attributes:
|
216
|
+
desc: You can make a table cell span rows or columns with a slash or backslash
|
217
|
+
and the number to span. Classes, IDs, style, and alignment are also possible
|
218
|
+
on table cells as with other elements.
|
219
|
+
input: |-
|
220
|
+
|{background:#ddd}_. Cell with background|_. Normal|
|
221
|
+
|\2. Cell spanning 2 columns|
|
222
|
+
|/2. Cell spanning 2 rows|one|
|
223
|
+
|{background:#ddd}. two|
|
224
|
+
|three|
|
225
|
+
|>. Right-aligned cell|<. Left-aligned cell|
|
226
|
+
output: |-
|
227
|
+
<table>
|
228
|
+
<tr>
|
229
|
+
<th style="background:#ddd;">Cell with background</td>
|
230
|
+
<th>Normal</td>
|
231
|
+
</tr>
|
232
|
+
<tr>
|
233
|
+
<td colspan="2">Cell spanning 2 columns</td>
|
234
|
+
</tr>
|
235
|
+
<tr>
|
236
|
+
<td rowspan="2">Cell spanning 2 rows</td>
|
237
|
+
<td>one</td>
|
238
|
+
</tr>
|
239
|
+
<tr>
|
240
|
+
<td style="background:#ddd;">two</td>
|
241
|
+
</tr>
|
242
|
+
<tr>
|
243
|
+
<td >three</td>
|
244
|
+
</tr>
|
245
|
+
<tr>
|
246
|
+
<td style="text-align:right;">Right-aligned cell</td>
|
247
|
+
<td style="text-align:left;">Left-aligned cell</td>
|
248
|
+
</tr>
|
249
|
+
</table>
|
250
|
+
Table attributes:
|
251
|
+
desc: 'To apply attributes to the entire table, use the @table.@ signature
|
252
|
+
on a line by itself before the table data. '
|
253
|
+
input: |-
|
254
|
+
table(#prices).
|
255
|
+
|Adults|$5|
|
256
|
+
|Children|$2|
|
257
|
+
output: |-
|
258
|
+
<table id="prices">
|
259
|
+
<tr>
|
260
|
+
<td>Adults</td>
|
261
|
+
<td>$5</td>
|
262
|
+
</tr>
|
263
|
+
<tr>
|
264
|
+
<td>Children</td>
|
265
|
+
<td>$2</td>
|
266
|
+
</tr>
|
267
|
+
</table>
|
268
|
+
Divisions:
|
269
|
+
Divisions:
|
270
|
+
desc: '@DIV@ tags are used to define a division or section in an HTML document. It
|
271
|
+
has no inherent meaning, but is often used by designers and developers to
|
272
|
+
group or style part of a page differently than another. You can easily create
|
273
|
+
a @div@ with Textile but most people who need a @div@ just use "HTML tags":/textile/html-integration-and-escapement/#block-html
|
274
|
+
in their Textile.'
|
275
|
+
input: div. A simple div.
|
276
|
+
output: <div>A simple div.</div>
|
@@ -0,0 +1,131 @@
|
|
1
|
+
Simple paragraphs:
|
2
|
+
Simple paragraphs:
|
3
|
+
desc: Paragraphs are separated by a blank line.
|
4
|
+
input: |-
|
5
|
+
This is a paragraph.
|
6
|
+
|
7
|
+
This is another paragraph
|
8
|
+
output: |-
|
9
|
+
<p>This is a paragraph.</p>
|
10
|
+
<p>This is another paragraph</p>
|
11
|
+
# Explicit paragraphs:
|
12
|
+
# desc: You can explicitly identify a paragraph with [@p. @] (p-period-space)
|
13
|
+
# before the paragraph.
|
14
|
+
# input: |-
|
15
|
+
# p. This is one paragraph.
|
16
|
+
|
17
|
+
# p. This is another.
|
18
|
+
# output: |-
|
19
|
+
# <p>This is one paragraph.</p>
|
20
|
+
# <p>This is another.</p>
|
21
|
+
# :capital_p:
|
22
|
+
# desc: A capital P abbreviation may start the sentence.
|
23
|
+
# input: "P. T. Barnum was a U.S. Showman"
|
24
|
+
# output: "<p>P. T. Barnum was a U.S. Showman</p>"
|
25
|
+
Line breaks:
|
26
|
+
Line breaks:
|
27
|
+
desc: Lines that don't have a blank line in between are part of the same paragraph.
|
28
|
+
input: |-
|
29
|
+
Roses are red,
|
30
|
+
Violets are blue,
|
31
|
+
I'd like a sandwich;
|
32
|
+
Perhaps even two.
|
33
|
+
output: |-
|
34
|
+
<p>Roses are red,<br />
|
35
|
+
Violets are blue,<br />
|
36
|
+
I’d like a sandwich;<br />
|
37
|
+
Perhaps even two.</p>
|
38
|
+
Line breaks in code:
|
39
|
+
desc: Line breaks in preformatted sections don't become HTML breaks.
|
40
|
+
input: |-
|
41
|
+
pre. Mirror mirror
|
42
|
+
on the wall...
|
43
|
+
|
44
|
+
output: |-
|
45
|
+
<pre>Mirror mirror
|
46
|
+
on the wall...
|
47
|
+
</pre>
|
48
|
+
Typographer's quotes:
|
49
|
+
Typographer's quotes:
|
50
|
+
desc: |-
|
51
|
+
Straight quotation marks are converted into <abbr title='a.k.a. "curly quotes"'>typographer's quotes</abbr>, which are easier on the eyes.
|
52
|
+
input: |-
|
53
|
+
"I said, 'hold the mayo' twice!"
|
54
|
+
output: <p>“I said, ‘hold the mayo’ twice!”</p>
|
55
|
+
Curly apostrophes:
|
56
|
+
desc: Apostrophes are also made curly.
|
57
|
+
input: We went to Steven's mother's house for a party.
|
58
|
+
output: <p>We went to Steven’s mother’s house for a party.</p>
|
59
|
+
Dashes:
|
60
|
+
Dashes:
|
61
|
+
desc: Single hyphens between words become en dashes; double hyphens become em
|
62
|
+
dashes. Hyphenated words are left alone.
|
63
|
+
input: I could be happy--fantastically happy--on twenty-one thousand a year
|
64
|
+
if I only had to work 9 am - 1 pm.
|
65
|
+
output: <p>I could be happy—fantastically happy—on twenty-one thousand
|
66
|
+
a year if I only had to work 9 am – 1 pm.</p>
|
67
|
+
En dash must have spaces:
|
68
|
+
desc: A dash, when it appears between words, must be surrounded by spaces.
|
69
|
+
input: June - July 1967
|
70
|
+
output: <p>June – July 1967</p>
|
71
|
+
Em dash spaces optional:
|
72
|
+
desc: "Em dashes may be set open or closed.\r\n\r\nbq.:http://en.wikipedia.org/wiki/Dash#Em_dash
|
73
|
+
According to most American sources (e.g., \"The Chicago Manual of Style\":http://en.wikipedia.org/wiki/The_Chicago_Manual_of_Style)
|
74
|
+
and to some British sources (e.g., \"The Oxford Guide to Style\":http://en.wikipedia.org/wiki/Hart%27s_Rules),
|
75
|
+
an em dash should always be set closed (not surrounded by spaces). But the
|
76
|
+
practice in many parts of the English-speaking world, also the style recommended
|
77
|
+
by \"The New York Times Manual of Style and Usage\":http://en.wikipedia.org/wiki/The_New_York_Times_Manual_of_Style_and_Usage,
|
78
|
+
sets it open (separates it from its surrounding words by using spaces) when
|
79
|
+
it is being used parenthetically."
|
80
|
+
input: Please use the em dash closed--or open if you must -- but I prefer it
|
81
|
+
closed.
|
82
|
+
output: <p>Please use the em dash closed—or open if you must — but
|
83
|
+
I prefer it closed.</p>
|
84
|
+
Ellipses:
|
85
|
+
Ellipses:
|
86
|
+
desc: Three periods become the ellipsis character.
|
87
|
+
input: He thought and thought ... and then thought some more.
|
88
|
+
output: <p>He thought and thought … and then thought some more.</p>
|
89
|
+
Ellipses without leading space:
|
90
|
+
desc: Consult your style manual for proper use of ellipses in conjunction with
|
91
|
+
spaces and other punctuation.
|
92
|
+
input: '"Four score and seven years ago our fathers brought forth...a new
|
93
|
+
nation...dedicated to the proposition that all men are created equal...."'
|
94
|
+
output: <p>“Four score and seven years ago our fathers brought forth…a
|
95
|
+
new nation…dedicated to the proposition that all men are created equal….”</p>
|
96
|
+
Dimension sign:
|
97
|
+
Dimension sign:
|
98
|
+
desc: The lowercase letter x between numbers becomes a dimension sign.
|
99
|
+
input: 4 x 4 = 16
|
100
|
+
output: <p>4 × 4 = 16</p>
|
101
|
+
Dimension with quotes:
|
102
|
+
desc: In Textile, quotes may be applied to the dimensions to represent feet
|
103
|
+
and inches.
|
104
|
+
input: |-
|
105
|
+
My office measures 5' x 5'6".
|
106
|
+
output: <p>My office measures 5′ × 5′6".</p>
|
107
|
+
Dimension spaces optional:
|
108
|
+
desc: Spaces between the numbers and the x are optional.
|
109
|
+
input: 4x4=16
|
110
|
+
output: <p>4×4=16</p>
|
111
|
+
Registered, trademark, and copyright symbols:
|
112
|
+
Registered, trademark, and copyright symbols:
|
113
|
+
desc: The copyright, registered, and trademark symbols can be produced by placing
|
114
|
+
the letters in parentheses.
|
115
|
+
input: RegisteredTrademark(r), Trademark(tm), and Copyright (c) 2011
|
116
|
+
output: <p>RegisteredTrademark®, Trademark™, and Copyright © 2011</p>
|
117
|
+
Acronyms:
|
118
|
+
Acronyms:
|
119
|
+
desc: You can provide the definition for acronyms inside parentheses.
|
120
|
+
input: The EPA(Environmental Protection Agency) is measuring GHG(greenhouse
|
121
|
+
gas) emissions.
|
122
|
+
output: <p>The <acronym title="Environmental Protection Agency"><span class="caps">EPA</span></acronym>
|
123
|
+
is measuring <acronym title="greenhouse gas"><span class="caps">GHG</span></acronym>
|
124
|
+
emissions.</p>
|
125
|
+
Uppercase:
|
126
|
+
Uppercase:
|
127
|
+
desc: Uppercase words are enclosed in a span element that can be styled to your
|
128
|
+
liking. Administrators can disable this feature with @:no_span_caps@.
|
129
|
+
input: Many NASDAQ companies are ISO certified.
|
130
|
+
output: <p>Many <span class="caps">NASDAQ</span> companies are <span class="caps">ISO</span>
|
131
|
+
certified.</p>
|