org-ruby 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +12 -0
- data/Rakefile +3 -5
- data/announcement.txt +24 -0
- data/doc/History_txt.html +272 -0
- data/doc/OrgRuby.html +149 -0
- data/doc/Orgmode.html +960 -0
- data/doc/Orgmode/Headline.html +522 -0
- data/doc/Orgmode/HtmlOutputBuffer.html +480 -0
- data/doc/Orgmode/Line.html +1251 -0
- data/doc/Orgmode/OutputBuffer.html +810 -0
- data/doc/Orgmode/Parser.html +852 -0
- data/doc/Orgmode/RegexpHelper.html +639 -0
- data/doc/Orgmode/TextileOutputBuffer.html +456 -0
- data/doc/README_rdoc.html +178 -0
- data/doc/announcement_txt.html +142 -0
- data/doc/bin/org-ruby.html +54 -0
- data/doc/created.rid +15 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +306 -0
- data/doc/js/darkfish.js +116 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/lib/org-ruby/headline_rb.html +52 -0
- data/doc/lib/org-ruby/html_output_buffer_rb.html +52 -0
- data/doc/lib/org-ruby/html_symbol_replace_rb.html +54 -0
- data/doc/lib/org-ruby/line_rb.html +52 -0
- data/doc/lib/org-ruby/output_buffer_rb.html +54 -0
- data/doc/lib/org-ruby/parser_rb.html +56 -0
- data/doc/lib/org-ruby/regexp_helper_rb.html +54 -0
- data/doc/lib/org-ruby/textile_output_buffer_rb.html +54 -0
- data/doc/lib/org-ruby/textile_symbol_replace_rb.html +54 -0
- data/doc/lib/org-ruby_rb.html +52 -0
- data/doc/rdoc.css +763 -0
- data/lib/org-ruby.rb +1 -1
- data/lib/org-ruby/headline.rb +2 -2
- data/lib/org-ruby/html_output_buffer.rb +62 -5
- data/lib/org-ruby/html_symbol_replace.rb +345 -0
- data/lib/org-ruby/line.rb +20 -9
- data/lib/org-ruby/output_buffer.rb +8 -1
- data/lib/org-ruby/parser.rb +47 -19
- data/lib/org-ruby/regexp_helper.rb +16 -0
- data/lib/org-ruby/textile_output_buffer.rb +37 -2
- data/lib/org-ruby/textile_symbol_replace.rb +345 -0
- data/org-ruby.gemspec +41 -0
- data/spec/headline_spec.rb +5 -0
- data/spec/html_examples/advanced-code.html +10 -0
- data/spec/html_examples/advanced-code.org +13 -0
- data/spec/html_examples/blockcomment.html +3 -0
- data/spec/html_examples/blockcomment.org +15 -0
- data/spec/html_examples/center.html +6 -0
- data/spec/html_examples/center.org +7 -0
- data/spec/html_examples/deflist.html +6 -0
- data/spec/html_examples/deflist.org +6 -0
- data/spec/html_examples/footnotes.html +10 -0
- data/spec/html_examples/footnotes.org +7 -0
- data/spec/html_examples/inline-formatting.html +8 -0
- data/spec/html_examples/inline-formatting.org +10 -0
- data/spec/html_examples/inline-images.html +1 -1
- data/spec/html_examples/lists.html +4 -0
- data/spec/html_examples/lists.org +11 -0
- data/spec/html_examples/subsupscript-nil.html +3 -0
- data/spec/html_examples/subsupscript-nil.org +6 -0
- data/spec/html_examples/subsupscript.html +3 -0
- data/spec/html_examples/subsupscript.org +5 -0
- data/spec/html_examples/tables.html +15 -0
- data/spec/html_examples/tables.org +24 -0
- data/spec/line_spec.rb +17 -13
- data/spec/spec_helper.rb +1 -2
- data/spec/textile_examples/center.org +7 -0
- data/spec/textile_examples/center.textile +6 -0
- data/spec/textile_examples/footnotes.org +7 -0
- data/spec/textile_examples/footnotes.textile +8 -0
- data/spec/textile_examples/tables.org +24 -0
- data/spec/textile_examples/tables.textile +17 -0
- data/util/gen-special-replace.el +37 -0
- metadata +111 -19
- data/.gitignore +0 -1
@@ -0,0 +1,456 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
5
|
+
<head>
|
6
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
|
7
|
+
|
8
|
+
<title>Class: Orgmode::TextileOutputBuffer</title>
|
9
|
+
|
10
|
+
<link rel="stylesheet" href="../rdoc.css" type="text/css" media="screen" />
|
11
|
+
|
12
|
+
<script src="../js/jquery.js" type="text/javascript" charset="utf-8"></script>
|
13
|
+
<script src="../js/thickbox-compressed.js" type="text/javascript" charset="utf-8"></script>
|
14
|
+
<script src="../js/quicksearch.js" type="text/javascript" charset="utf-8"></script>
|
15
|
+
<script src="../js/darkfish.js" type="text/javascript" charset="utf-8"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body id="top" class="class">
|
19
|
+
|
20
|
+
<div id="metadata">
|
21
|
+
<div id="home-metadata">
|
22
|
+
<div id="home-section" class="section">
|
23
|
+
<h3 class="section-header">
|
24
|
+
<a href="../index.html">Home</a>
|
25
|
+
<a href="../index.html#classes">Classes</a>
|
26
|
+
<a href="../index.html#methods">Methods</a>
|
27
|
+
</h3>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
|
31
|
+
<div id="file-metadata">
|
32
|
+
<div id="file-list-section" class="section">
|
33
|
+
<h3 class="section-header">In Files</h3>
|
34
|
+
<div class="section-body">
|
35
|
+
<ul>
|
36
|
+
|
37
|
+
<li><a href="../lib/org-ruby/textile_output_buffer_rb.html?TB_iframe=true&height=550&width=785"
|
38
|
+
class="thickbox" title="lib/org-ruby/textile_output_buffer.rb">lib/org-ruby/textile_output_buffer.rb</a></li>
|
39
|
+
|
40
|
+
</ul>
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<div id="class-metadata">
|
48
|
+
|
49
|
+
<!-- Parent Class -->
|
50
|
+
<div id="parent-class-section" class="section">
|
51
|
+
<h3 class="section-header">Parent</h3>
|
52
|
+
|
53
|
+
<p class="link"><a href="OutputBuffer.html">Orgmode::OutputBuffer</a></p>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
<!-- Method Quickref -->
|
64
|
+
<div id="method-list-section" class="section">
|
65
|
+
<h3 class="section-header">Methods</h3>
|
66
|
+
<ul class="link-list">
|
67
|
+
|
68
|
+
<li><a href="#method-c-new">::new</a></li>
|
69
|
+
|
70
|
+
<li><a href="#method-i-flush-21">#flush!</a></li>
|
71
|
+
|
72
|
+
<li><a href="#method-i-inline_formatting">#inline_formatting</a></li>
|
73
|
+
|
74
|
+
<li><a href="#method-i-output_footnotes-21">#output_footnotes!</a></li>
|
75
|
+
|
76
|
+
<li><a href="#method-i-pop_mode">#pop_mode</a></li>
|
77
|
+
|
78
|
+
<li><a href="#method-i-push_mode">#push_mode</a></li>
|
79
|
+
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
</div>
|
86
|
+
|
87
|
+
<div id="project-metadata">
|
88
|
+
|
89
|
+
|
90
|
+
<div id="fileindex-section" class="section project-section">
|
91
|
+
<h3 class="section-header">Files</h3>
|
92
|
+
<ul>
|
93
|
+
|
94
|
+
<li class="file"><a href="../History_txt.html">History.txt</a></li>
|
95
|
+
|
96
|
+
<li class="file"><a href="../README_rdoc.html">README.rdoc</a></li>
|
97
|
+
|
98
|
+
<li class="file"><a href="../announcement_txt.html">announcement.txt</a></li>
|
99
|
+
|
100
|
+
</ul>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<div id="classindex-section" class="section project-section">
|
105
|
+
<h3 class="section-header">Class/Module Index
|
106
|
+
<span class="search-toggle"><img src="../images/find.png"
|
107
|
+
height="16" width="16" alt="[+]"
|
108
|
+
title="show/hide quicksearch" /></span></h3>
|
109
|
+
<form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
|
110
|
+
<fieldset>
|
111
|
+
<legend>Quicksearch</legend>
|
112
|
+
<input type="text" name="quicksearch" value=""
|
113
|
+
class="quicksearch-field" />
|
114
|
+
</fieldset>
|
115
|
+
</form>
|
116
|
+
|
117
|
+
<ul class="link-list">
|
118
|
+
|
119
|
+
<li><a href="../Orgmode.html">Orgmode</a></li>
|
120
|
+
|
121
|
+
<li><a href="../Orgmode/Headline.html">Orgmode::Headline</a></li>
|
122
|
+
|
123
|
+
<li><a href="../Orgmode/HtmlOutputBuffer.html">Orgmode::HtmlOutputBuffer</a></li>
|
124
|
+
|
125
|
+
<li><a href="../Orgmode/Line.html">Orgmode::Line</a></li>
|
126
|
+
|
127
|
+
<li><a href="../Orgmode/OutputBuffer.html">Orgmode::OutputBuffer</a></li>
|
128
|
+
|
129
|
+
<li><a href="../Orgmode/Parser.html">Orgmode::Parser</a></li>
|
130
|
+
|
131
|
+
<li><a href="../Orgmode/RegexpHelper.html">Orgmode::RegexpHelper</a></li>
|
132
|
+
|
133
|
+
<li><a href="../Orgmode/TextileOutputBuffer.html">Orgmode::TextileOutputBuffer</a></li>
|
134
|
+
|
135
|
+
<li><a href="../OrgRuby.html">OrgRuby</a></li>
|
136
|
+
|
137
|
+
</ul>
|
138
|
+
<div id="no-class-search-results" style="display: none;">No matching classes.</div>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
<div id="documentation">
|
146
|
+
<h1 class="class">Orgmode::TextileOutputBuffer</h1>
|
147
|
+
|
148
|
+
<div id="description" class="description">
|
149
|
+
|
150
|
+
</div><!-- description -->
|
151
|
+
|
152
|
+
|
153
|
+
<div id="5Buntitled-5D" class="documentation-section">
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
<!-- Constants -->
|
160
|
+
<div id="constants-list" class="section">
|
161
|
+
<h3 class="section-header">Constants</h3>
|
162
|
+
<dl>
|
163
|
+
|
164
|
+
<dt><a name="TextileMap">TextileMap</a></dt>
|
165
|
+
|
166
|
+
<dd class="description"><p>Maps org markup to textile markup.</p></dd>
|
167
|
+
|
168
|
+
|
169
|
+
</dl>
|
170
|
+
</div>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
<!-- Methods -->
|
176
|
+
|
177
|
+
<div id="public-class-method-details" class="method-section section">
|
178
|
+
<h3 class="section-header">Public Class Methods</h3>
|
179
|
+
|
180
|
+
|
181
|
+
<div id="new-method" class="method-detail ">
|
182
|
+
<a name="method-c-new"></a>
|
183
|
+
|
184
|
+
|
185
|
+
<div class="method-heading">
|
186
|
+
<span class="method-name">new</span><span
|
187
|
+
class="method-args">(output)</span>
|
188
|
+
<span class="method-click-advice">click to toggle source</span>
|
189
|
+
</div>
|
190
|
+
|
191
|
+
|
192
|
+
<div class="method-description">
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
<div class="method-source-code" id="new-source">
|
199
|
+
<pre>
|
200
|
+
<span class="ruby-comment"># File lib/org-ruby/textile_output_buffer.rb, line 7</span>
|
201
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">output</span>)
|
202
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">output</span>)
|
203
|
+
<span class="ruby-ivar">@add_paragraph</span> = <span class="ruby-keyword">false</span>
|
204
|
+
<span class="ruby-ivar">@support_definition_list</span> = <span class="ruby-keyword">true</span> <span class="ruby-comment"># TODO this should be an option</span>
|
205
|
+
<span class="ruby-ivar">@footnotes</span> = {}
|
206
|
+
<span class="ruby-keyword">end</span></pre>
|
207
|
+
</div><!-- new-source -->
|
208
|
+
|
209
|
+
</div>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
</div><!-- new-method -->
|
215
|
+
|
216
|
+
|
217
|
+
</div><!-- public-class-method-details -->
|
218
|
+
|
219
|
+
<div id="public-instance-method-details" class="method-section section">
|
220
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
221
|
+
|
222
|
+
|
223
|
+
<div id="flush-21-method" class="method-detail ">
|
224
|
+
<a name="method-i-flush-21"></a>
|
225
|
+
|
226
|
+
|
227
|
+
<div class="method-heading">
|
228
|
+
<span class="method-name">flush!</span><span
|
229
|
+
class="method-args">()</span>
|
230
|
+
<span class="method-click-advice">click to toggle source</span>
|
231
|
+
</div>
|
232
|
+
|
233
|
+
|
234
|
+
<div class="method-description">
|
235
|
+
|
236
|
+
<p>Flushes the current buffer</p>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
<div class="method-source-code" id="flush-21-source">
|
241
|
+
<pre>
|
242
|
+
<span class="ruby-comment"># File lib/org-ruby/textile_output_buffer.rb, line 76</span>
|
243
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">flush!</span>
|
244
|
+
<span class="ruby-ivar">@logger</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">"FLUSH ==========> #{@output_type}"</span>
|
245
|
+
<span class="ruby-keyword">if</span> (<span class="ruby-ivar">@output_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:blank</span>) <span class="ruby-keyword">then</span>
|
246
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"\n"</span>
|
247
|
+
<span class="ruby-keyword">elsif</span> (<span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">></span> <span class="ruby-value">0</span>) <span class="ruby-keyword">then</span>
|
248
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@add_paragraph</span> <span class="ruby-keyword">then</span>
|
249
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"p. "</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@output_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:paragraph</span>
|
250
|
+
<span class="ruby-ivar">@add_paragraph</span> = <span class="ruby-keyword">false</span>
|
251
|
+
<span class="ruby-keyword">end</span>
|
252
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"bq. "</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">current_mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:blockquote</span>
|
253
|
+
<span class="ruby-keyword">if</span> <span class="ruby-ivar">@output_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:definition_list</span> <span class="ruby-keyword">and</span> <span class="ruby-ivar">@support_definition_list</span> <span class="ruby-keyword">then</span>
|
254
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"-"</span> * <span class="ruby-ivar">@list_indent_stack</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator"><<</span> <span class="ruby-string">" "</span>
|
255
|
+
<span class="ruby-ivar">@buffer</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-string">"::"</span>, <span class="ruby-string">":="</span>)
|
256
|
+
<span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@output_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:ordered_list</span> <span class="ruby-keyword">then</span>
|
257
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#"</span> * <span class="ruby-ivar">@list_indent_stack</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator"><<</span> <span class="ruby-string">" "</span>
|
258
|
+
<span class="ruby-keyword">elsif</span> <span class="ruby-ivar">@output_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:unordered_list</span> <span class="ruby-keyword">or</span> (<span class="ruby-ivar">@output_type</span> <span class="ruby-operator">==</span> <span class="ruby-value">:definition_list</span> <span class="ruby-keyword">and</span> <span class="ruby-keyword">not</span> <span class="ruby-ivar">@support_definition_list</span>) <span class="ruby-keyword">then</span>
|
259
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"*"</span> * <span class="ruby-ivar">@list_indent_stack</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator"><<</span> <span class="ruby-string">" "</span>
|
260
|
+
<span class="ruby-keyword">end</span>
|
261
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">inline_formatting</span>(<span class="ruby-ivar">@buffer</span>) <span class="ruby-operator"><<</span> <span class="ruby-string">"\n"</span>
|
262
|
+
<span class="ruby-keyword">end</span>
|
263
|
+
<span class="ruby-identifier">clear_accumulation_buffer!</span>
|
264
|
+
<span class="ruby-keyword">end</span></pre>
|
265
|
+
</div><!-- flush-21-source -->
|
266
|
+
|
267
|
+
</div>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
</div><!-- flush-21-method -->
|
273
|
+
|
274
|
+
|
275
|
+
<div id="inline_formatting-method" class="method-detail ">
|
276
|
+
<a name="method-i-inline_formatting"></a>
|
277
|
+
|
278
|
+
|
279
|
+
<div class="method-heading">
|
280
|
+
<span class="method-name">inline_formatting</span><span
|
281
|
+
class="method-args">(input)</span>
|
282
|
+
<span class="method-click-advice">click to toggle source</span>
|
283
|
+
</div>
|
284
|
+
|
285
|
+
|
286
|
+
<div class="method-description">
|
287
|
+
|
288
|
+
<p>Handles inline formatting for textile.</p>
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
<div class="method-source-code" id="inline_formatting-source">
|
293
|
+
<pre>
|
294
|
+
<span class="ruby-comment"># File lib/org-ruby/textile_output_buffer.rb, line 38</span>
|
295
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">inline_formatting</span>(<span class="ruby-identifier">input</span>)
|
296
|
+
<span class="ruby-identifier">input</span> = <span class="ruby-ivar">@re_help</span>.<span class="ruby-identifier">rewrite_emphasis</span>(<span class="ruby-identifier">input</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">marker</span>, <span class="ruby-identifier">body</span><span class="ruby-operator">|</span>
|
297
|
+
<span class="ruby-identifier">m</span> = <span class="ruby-constant">TextileMap</span>[<span class="ruby-identifier">marker</span>]
|
298
|
+
<span class="ruby-node">"#{m}#{body}#{m}"</span>
|
299
|
+
<span class="ruby-keyword">end</span>
|
300
|
+
<span class="ruby-identifier">input</span> = <span class="ruby-ivar">@re_help</span>.<span class="ruby-identifier">rewrite_subp</span>(<span class="ruby-identifier">input</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span>, <span class="ruby-identifier">text</span><span class="ruby-operator">|</span>
|
301
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"_"</span> <span class="ruby-keyword">then</span>
|
302
|
+
<span class="ruby-node">"~#{text}~"</span>
|
303
|
+
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">type</span> <span class="ruby-operator">==</span> <span class="ruby-string">"^"</span> <span class="ruby-keyword">then</span>
|
304
|
+
<span class="ruby-node">"^#{text}^"</span>
|
305
|
+
<span class="ruby-keyword">end</span>
|
306
|
+
<span class="ruby-keyword">end</span>
|
307
|
+
<span class="ruby-identifier">input</span> = <span class="ruby-ivar">@re_help</span>.<span class="ruby-identifier">rewrite_links</span>(<span class="ruby-identifier">input</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">link</span>, <span class="ruby-identifier">text</span><span class="ruby-operator">|</span>
|
308
|
+
<span class="ruby-identifier">text</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">link</span>
|
309
|
+
<span class="ruby-identifier">link</span> = <span class="ruby-identifier">link</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp">/ /</span>, <span class="ruby-string">"%20"</span>)
|
310
|
+
<span class="ruby-node">"\"#{text}\":#{link}"</span>
|
311
|
+
<span class="ruby-keyword">end</span>
|
312
|
+
<span class="ruby-identifier">input</span> = <span class="ruby-ivar">@re_help</span>.<span class="ruby-identifier">rewrite_footnote</span>(<span class="ruby-identifier">input</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">defi</span><span class="ruby-operator">|</span>
|
313
|
+
<span class="ruby-comment"># textile only support numerical names! Use hash as a workarround</span>
|
314
|
+
<span class="ruby-identifier">name</span> = <span class="ruby-identifier">name</span>.<span class="ruby-identifier">hash</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_i</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span> <span class="ruby-comment"># check if number</span>
|
315
|
+
<span class="ruby-ivar">@footnotes</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">defi</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">defi</span>
|
316
|
+
<span class="ruby-node">"[#{name}]"</span>
|
317
|
+
<span class="ruby-keyword">end</span>
|
318
|
+
<span class="ruby-constant">Orgmode</span>.<span class="ruby-identifier">special_symbols_to_textile</span>(<span class="ruby-identifier">input</span>)
|
319
|
+
<span class="ruby-identifier">input</span>
|
320
|
+
<span class="ruby-keyword">end</span></pre>
|
321
|
+
</div><!-- inline_formatting-source -->
|
322
|
+
|
323
|
+
</div>
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
</div><!-- inline_formatting-method -->
|
329
|
+
|
330
|
+
|
331
|
+
<div id="output_footnotes-21-method" class="method-detail ">
|
332
|
+
<a name="method-i-output_footnotes-21"></a>
|
333
|
+
|
334
|
+
|
335
|
+
<div class="method-heading">
|
336
|
+
<span class="method-name">output_footnotes!</span><span
|
337
|
+
class="method-args">()</span>
|
338
|
+
<span class="method-click-advice">click to toggle source</span>
|
339
|
+
</div>
|
340
|
+
|
341
|
+
|
342
|
+
<div class="method-description">
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
<div class="method-source-code" id="output_footnotes-21-source">
|
349
|
+
<pre>
|
350
|
+
<span class="ruby-comment"># File lib/org-ruby/textile_output_buffer.rb, line 65</span>
|
351
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">output_footnotes!</span>
|
352
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-ivar">@footnotes</span>.<span class="ruby-identifier">empty?</span>
|
353
|
+
|
354
|
+
<span class="ruby-ivar">@footnotes</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">defi</span><span class="ruby-operator">|</span>
|
355
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"\nfn#{name}. #{defi}\n"</span>
|
356
|
+
<span class="ruby-keyword">end</span>
|
357
|
+
|
358
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span>
|
359
|
+
<span class="ruby-keyword">end</span></pre>
|
360
|
+
</div><!-- output_footnotes-21-source -->
|
361
|
+
|
362
|
+
</div>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
</div><!-- output_footnotes-21-method -->
|
368
|
+
|
369
|
+
|
370
|
+
<div id="pop_mode-method" class="method-detail ">
|
371
|
+
<a name="method-i-pop_mode"></a>
|
372
|
+
|
373
|
+
|
374
|
+
<div class="method-heading">
|
375
|
+
<span class="method-name">pop_mode</span><span
|
376
|
+
class="method-args">(mode = nil)</span>
|
377
|
+
<span class="method-click-advice">click to toggle source</span>
|
378
|
+
</div>
|
379
|
+
|
380
|
+
|
381
|
+
<div class="method-description">
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
<div class="method-source-code" id="pop_mode-source">
|
388
|
+
<pre>
|
389
|
+
<span class="ruby-comment"># File lib/org-ruby/textile_output_buffer.rb, line 20</span>
|
390
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">pop_mode</span>(<span class="ruby-identifier">mode</span> = <span class="ruby-keyword">nil</span>)
|
391
|
+
<span class="ruby-identifier">m</span> = <span class="ruby-keyword">super</span>(<span class="ruby-identifier">mode</span>)
|
392
|
+
<span class="ruby-ivar">@add_paragraph</span> = (<span class="ruby-identifier">mode_is_code</span>(<span class="ruby-identifier">m</span>))
|
393
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"\n"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:center</span>
|
394
|
+
<span class="ruby-identifier">m</span>
|
395
|
+
<span class="ruby-keyword">end</span></pre>
|
396
|
+
</div><!-- pop_mode-source -->
|
397
|
+
|
398
|
+
</div>
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
</div><!-- pop_mode-method -->
|
404
|
+
|
405
|
+
|
406
|
+
<div id="push_mode-method" class="method-detail ">
|
407
|
+
<a name="method-i-push_mode"></a>
|
408
|
+
|
409
|
+
|
410
|
+
<div class="method-heading">
|
411
|
+
<span class="method-name">push_mode</span><span
|
412
|
+
class="method-args">(mode)</span>
|
413
|
+
<span class="method-click-advice">click to toggle source</span>
|
414
|
+
</div>
|
415
|
+
|
416
|
+
|
417
|
+
<div class="method-description">
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
<div class="method-source-code" id="push_mode-source">
|
424
|
+
<pre>
|
425
|
+
<span class="ruby-comment"># File lib/org-ruby/textile_output_buffer.rb, line 14</span>
|
426
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">push_mode</span>(<span class="ruby-identifier">mode</span>)
|
427
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">mode</span>)
|
428
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"bc.. "</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mode_is_code</span>(<span class="ruby-identifier">mode</span>)
|
429
|
+
<span class="ruby-ivar">@output</span> <span class="ruby-operator"><<</span> <span class="ruby-string">"\np=. "</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">mode</span> <span class="ruby-operator">==</span> <span class="ruby-value">:center</span>
|
430
|
+
<span class="ruby-keyword">end</span></pre>
|
431
|
+
</div><!-- push_mode-source -->
|
432
|
+
|
433
|
+
</div>
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
</div><!-- push_mode-method -->
|
439
|
+
|
440
|
+
|
441
|
+
</div><!-- public-instance-method-details -->
|
442
|
+
|
443
|
+
</div><!-- 5Buntitled-5D -->
|
444
|
+
|
445
|
+
|
446
|
+
</div><!-- documentation -->
|
447
|
+
|
448
|
+
<div id="validator-badges">
|
449
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
450
|
+
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
451
|
+
Rdoc Generator</a> 2</small>.</p>
|
452
|
+
</div>
|
453
|
+
|
454
|
+
</body>
|
455
|
+
</html>
|
456
|
+
|