org-ruby 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.bnsignore +18 -0
- data/History.txt +40 -32
- data/README.txt +66 -66
- data/Rakefile +27 -26
- data/bin/org-ruby +40 -40
- data/lib/org-ruby.rb +50 -50
- data/lib/org-ruby/headline.rb +80 -75
- data/lib/org-ruby/html_output_buffer.rb +105 -81
- data/lib/org-ruby/line.rb +173 -173
- data/lib/org-ruby/output_buffer.rb +172 -154
- data/lib/org-ruby/parser.rb +80 -76
- data/lib/org-ruby/regexp_helper.rb +156 -156
- data/lib/org-ruby/textile_output_buffer.rb +67 -67
- data/spec/data/freeform.org +111 -111
- data/spec/data/hyp-planning.org +335 -335
- data/spec/data/remember.org +53 -53
- data/spec/headline_spec.rb +55 -55
- data/spec/html_examples/advanced-lists.html +31 -0
- data/spec/html_examples/advanced-lists.org +31 -0
- data/spec/html_examples/block_code.html +30 -30
- data/spec/html_examples/block_code.org +35 -35
- data/spec/html_examples/blockquote.html +7 -7
- data/spec/html_examples/blockquote.org +13 -13
- data/spec/html_examples/escape-pre.html +7 -7
- data/spec/html_examples/escape-pre.org +6 -6
- data/spec/html_examples/inline-formatting.html +10 -10
- data/spec/html_examples/inline-formatting.org +17 -17
- data/spec/html_examples/lists.html +19 -19
- data/spec/html_examples/lists.org +36 -36
- data/spec/html_examples/only-list.html +5 -5
- data/spec/html_examples/only-list.org +3 -3
- data/spec/html_examples/only-table.html +6 -6
- data/spec/html_examples/only-table.org +5 -5
- data/spec/html_examples/tables.html +20 -20
- data/spec/html_examples/tables.org +26 -26
- data/spec/html_examples/text.html +2 -2
- data/spec/html_examples/text.org +16 -16
- data/spec/line_spec.rb +89 -89
- data/spec/parser_spec.rb +86 -86
- data/spec/regexp_helper_spec.rb +57 -57
- data/spec/spec_helper.rb +20 -20
- data/spec/textile_examples/block_code.org +35 -35
- data/spec/textile_examples/block_code.textile +29 -29
- data/spec/textile_examples/blockquote.org +13 -13
- data/spec/textile_examples/blockquote.textile +11 -11
- data/spec/textile_examples/keywords.org +13 -13
- data/spec/textile_examples/keywords.textile +11 -11
- data/spec/textile_examples/links.org +11 -11
- data/spec/textile_examples/links.textile +10 -10
- data/spec/textile_examples/lists.org +36 -36
- data/spec/textile_examples/lists.textile +20 -20
- data/spec/textile_examples/single-space-plain-list.org +13 -13
- data/spec/textile_examples/single-space-plain-list.textile +10 -10
- data/spec/textile_examples/tables.org +26 -26
- data/spec/textile_examples/tables.textile +23 -23
- data/spec/textile_output_buffer_spec.rb +21 -21
- data/tasks/test_case.rake +49 -49
- metadata +5 -2
@@ -1,13 +1,13 @@
|
|
1
|
-
BLOCKQUOTE
|
2
|
-
|
3
|
-
Testing that I can have block quotes:
|
4
|
-
|
5
|
-
#+BEGIN_QUOTE
|
6
|
-
|
7
|
-
/Example:/
|
8
|
-
|
9
|
-
This is blockquote text.
|
10
|
-
|
11
|
-
#+END_QUOTE
|
12
|
-
|
13
|
-
And now I'm back to normal text!
|
1
|
+
BLOCKQUOTE
|
2
|
+
|
3
|
+
Testing that I can have block quotes:
|
4
|
+
|
5
|
+
#+BEGIN_QUOTE
|
6
|
+
|
7
|
+
/Example:/
|
8
|
+
|
9
|
+
This is blockquote text.
|
10
|
+
|
11
|
+
#+END_QUOTE
|
12
|
+
|
13
|
+
And now I'm back to normal text!
|
@@ -1,11 +1,11 @@
|
|
1
|
-
BLOCKQUOTE
|
2
|
-
|
3
|
-
Testing that I can have block quotes:
|
4
|
-
|
5
|
-
|
6
|
-
bq. _Example:_
|
7
|
-
|
8
|
-
bq. This is blockquote text.
|
9
|
-
|
10
|
-
|
11
|
-
And now I'm back to normal text!
|
1
|
+
BLOCKQUOTE
|
2
|
+
|
3
|
+
Testing that I can have block quotes:
|
4
|
+
|
5
|
+
|
6
|
+
bq. _Example:_
|
7
|
+
|
8
|
+
bq. This is blockquote text.
|
9
|
+
|
10
|
+
|
11
|
+
And now I'm back to normal text!
|
@@ -1,13 +1,13 @@
|
|
1
|
-
KEYWORDS
|
2
|
-
|
3
|
-
By default, I don't want keywords exported to textile.
|
4
|
-
|
5
|
-
* DONE Recognize standard keywords
|
6
|
-
CLOSED: [2009-12-21 Mon 15:23]
|
7
|
-
|
8
|
-
The standard =orgmode= keywords are TODO and DONE. Recognize those.
|
9
|
-
|
10
|
-
* TODO Recongize buffer-specific keywords
|
11
|
-
|
12
|
-
There's a way to define a custom keyword list in a buffer. Research
|
13
|
-
that and handle it.
|
1
|
+
KEYWORDS
|
2
|
+
|
3
|
+
By default, I don't want keywords exported to textile.
|
4
|
+
|
5
|
+
* DONE Recognize standard keywords
|
6
|
+
CLOSED: [2009-12-21 Mon 15:23]
|
7
|
+
|
8
|
+
The standard =orgmode= keywords are TODO and DONE. Recognize those.
|
9
|
+
|
10
|
+
* TODO Recongize buffer-specific keywords
|
11
|
+
|
12
|
+
There's a way to define a custom keyword list in a buffer. Research
|
13
|
+
that and handle it.
|
@@ -1,11 +1,11 @@
|
|
1
|
-
KEYWORDS
|
2
|
-
|
3
|
-
By default, I don't want keywords exported to textile.
|
4
|
-
|
5
|
-
h1. Recognize standard keywords
|
6
|
-
|
7
|
-
The standard @orgmode@ keywords are TODO and DONE. Recognize those.
|
8
|
-
|
9
|
-
h1. Recongize buffer-specific keywords
|
10
|
-
|
11
|
-
There's a way to define a custom keyword list in a buffer. Research that and handle it.
|
1
|
+
KEYWORDS
|
2
|
+
|
3
|
+
By default, I don't want keywords exported to textile.
|
4
|
+
|
5
|
+
h1. Recognize standard keywords
|
6
|
+
|
7
|
+
The standard @orgmode@ keywords are TODO and DONE. Recognize those.
|
8
|
+
|
9
|
+
h1. Recongize buffer-specific keywords
|
10
|
+
|
11
|
+
There's a way to define a custom keyword list in a buffer. Research that and handle it.
|
@@ -1,11 +1,11 @@
|
|
1
|
-
LINKS
|
2
|
-
|
3
|
-
[[http://www.bing.com]]
|
4
|
-
|
5
|
-
* Supported Link Styles
|
6
|
-
|
7
|
-
- [[http://www.hotmail.com]] => Simple
|
8
|
-
- [[http://www.hotmail.com][Hotmail]] => With link text
|
9
|
-
- [[http://url/with spaces][with spaces]]
|
10
|
-
- [[http://url/with spaces]]
|
11
|
-
|
1
|
+
LINKS
|
2
|
+
|
3
|
+
[[http://www.bing.com]]
|
4
|
+
|
5
|
+
* Supported Link Styles
|
6
|
+
|
7
|
+
- [[http://www.hotmail.com]] => Simple
|
8
|
+
- [[http://www.hotmail.com][Hotmail]] => With link text
|
9
|
+
- [[http://url/with spaces][with spaces]]
|
10
|
+
- [[http://url/with spaces]]
|
11
|
+
|
@@ -1,10 +1,10 @@
|
|
1
|
-
LINKS
|
2
|
-
|
3
|
-
"http://www.bing.com":http://www.bing.com
|
4
|
-
|
5
|
-
h1. Supported Link Styles
|
6
|
-
|
7
|
-
* "http://www.hotmail.com":http://www.hotmail.com => Simple
|
8
|
-
* "Hotmail":http://www.hotmail.com => With link text
|
9
|
-
* "with spaces":http://url/with%20spaces
|
10
|
-
* "http://url/with spaces":http://url/with%20spaces
|
1
|
+
LINKS
|
2
|
+
|
3
|
+
"http://www.bing.com":http://www.bing.com
|
4
|
+
|
5
|
+
h1. Supported Link Styles
|
6
|
+
|
7
|
+
* "http://www.hotmail.com":http://www.hotmail.com => Simple
|
8
|
+
* "Hotmail":http://www.hotmail.com => With link text
|
9
|
+
* "with spaces":http://url/with%20spaces
|
10
|
+
* "http://url/with spaces":http://url/with%20spaces
|
@@ -1,36 +1,36 @@
|
|
1
|
-
* Lists
|
2
|
-
|
3
|
-
I want to make sure I have great support for lists.
|
4
|
-
|
5
|
-
- This is an unordered list
|
6
|
-
- This continues the unordered list
|
7
|
-
|
8
|
-
And this is a paragraph *after* the list.
|
9
|
-
|
10
|
-
** Wrapping within the list
|
11
|
-
|
12
|
-
- This is a single-line list item in the org file.
|
13
|
-
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
|
14
|
-
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
|
15
|
-
erat, sed diam voluptua. At vero eos et accusam et justo duo
|
16
|
-
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata
|
17
|
-
sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
|
18
|
-
amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
19
|
-
invidunt ut labore et dolore magna aliquyam erat, sed diam
|
20
|
-
voluptua. At vero eos et accusam et justo duo dolores et ea
|
21
|
-
rebum. Stet clita kasd gubergren, no sea takimata sanctus est
|
22
|
-
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
|
23
|
-
consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
24
|
-
invidunt ut labore et dolore magna aliquyam erat, sed diam
|
25
|
-
voluptua. At vero eos et accusam et justo duo dolores et ea
|
26
|
-
rebum. Stet clita kasd gubergren, no sea takimata sanctus est
|
27
|
-
Lorem ipsum dolor sit amet.
|
28
|
-
- And this is the next item. The previous item needs to be on one
|
29
|
-
line to keep =textile= happy.
|
30
|
-
- Ditto the previous line, actually.
|
31
|
-
|
32
|
-
** Edge cases
|
33
|
-
|
34
|
-
- This is a single-line list.
|
35
|
-
And this is a *separate paragraph.* Note the indentation in the org
|
36
|
-
file.
|
1
|
+
* Lists
|
2
|
+
|
3
|
+
I want to make sure I have great support for lists.
|
4
|
+
|
5
|
+
- This is an unordered list
|
6
|
+
- This continues the unordered list
|
7
|
+
|
8
|
+
And this is a paragraph *after* the list.
|
9
|
+
|
10
|
+
** Wrapping within the list
|
11
|
+
|
12
|
+
- This is a single-line list item in the org file.
|
13
|
+
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
|
14
|
+
nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam
|
15
|
+
erat, sed diam voluptua. At vero eos et accusam et justo duo
|
16
|
+
dolores et ea rebum. Stet clita kasd gubergren, no sea takimata
|
17
|
+
sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit
|
18
|
+
amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
19
|
+
invidunt ut labore et dolore magna aliquyam erat, sed diam
|
20
|
+
voluptua. At vero eos et accusam et justo duo dolores et ea
|
21
|
+
rebum. Stet clita kasd gubergren, no sea takimata sanctus est
|
22
|
+
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet,
|
23
|
+
consetetur sadipscing elitr, sed diam nonumy eirmod tempor
|
24
|
+
invidunt ut labore et dolore magna aliquyam erat, sed diam
|
25
|
+
voluptua. At vero eos et accusam et justo duo dolores et ea
|
26
|
+
rebum. Stet clita kasd gubergren, no sea takimata sanctus est
|
27
|
+
Lorem ipsum dolor sit amet.
|
28
|
+
- And this is the next item. The previous item needs to be on one
|
29
|
+
line to keep =textile= happy.
|
30
|
+
- Ditto the previous line, actually.
|
31
|
+
|
32
|
+
** Edge cases
|
33
|
+
|
34
|
+
- This is a single-line list.
|
35
|
+
And this is a *separate paragraph.* Note the indentation in the org
|
36
|
+
file.
|
@@ -1,20 +1,20 @@
|
|
1
|
-
h1. Lists
|
2
|
-
|
3
|
-
I want to make sure I have great support for lists.
|
4
|
-
|
5
|
-
* This is an unordered list
|
6
|
-
* This continues the unordered list
|
7
|
-
|
8
|
-
And this is a paragraph *after* the list.
|
9
|
-
|
10
|
-
h2. Wrapping within the list
|
11
|
-
|
12
|
-
* This is a single-line list item in the org file.
|
13
|
-
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
14
|
-
* And this is the next item. The previous item needs to be on one line to keep @textile@ happy.
|
15
|
-
* Ditto the previous line, actually.
|
16
|
-
|
17
|
-
h2. Edge cases
|
18
|
-
|
19
|
-
* This is a single-line list.
|
20
|
-
And this is a *separate paragraph.* Note the indentation in the org file.
|
1
|
+
h1. Lists
|
2
|
+
|
3
|
+
I want to make sure I have great support for lists.
|
4
|
+
|
5
|
+
* This is an unordered list
|
6
|
+
* This continues the unordered list
|
7
|
+
|
8
|
+
And this is a paragraph *after* the list.
|
9
|
+
|
10
|
+
h2. Wrapping within the list
|
11
|
+
|
12
|
+
* This is a single-line list item in the org file.
|
13
|
+
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
|
14
|
+
* And this is the next item. The previous item needs to be on one line to keep @textile@ happy.
|
15
|
+
* Ditto the previous line, actually.
|
16
|
+
|
17
|
+
h2. Edge cases
|
18
|
+
|
19
|
+
* This is a single-line list.
|
20
|
+
And this is a *separate paragraph.* Note the indentation in the org file.
|
@@ -1,13 +1,13 @@
|
|
1
|
-
** Anatomy of a BVP
|
2
|
-
|
3
|
-
Each BVP followed a simple, one-page template with the following
|
4
|
-
parts:
|
5
|
-
|
6
|
-
- Customer Summary
|
7
|
-
- Storyboard
|
8
|
-
- Requirements
|
9
|
-
- Partner teams
|
10
|
-
|
11
|
-
The following sections walk through each section and give an
|
12
|
-
example from one of our BVPs, [[http://windows/hyper-v/initiatives/Value Propositions/DynamicDatacenter-ValueProp.docx][Resource-Smart Virtualization
|
13
|
-
Infrastructure]] (also called /Dynamic Datacenter/).
|
1
|
+
** Anatomy of a BVP
|
2
|
+
|
3
|
+
Each BVP followed a simple, one-page template with the following
|
4
|
+
parts:
|
5
|
+
|
6
|
+
- Customer Summary
|
7
|
+
- Storyboard
|
8
|
+
- Requirements
|
9
|
+
- Partner teams
|
10
|
+
|
11
|
+
The following sections walk through each section and give an
|
12
|
+
example from one of our BVPs, [[http://windows/hyper-v/initiatives/Value Propositions/DynamicDatacenter-ValueProp.docx][Resource-Smart Virtualization
|
13
|
+
Infrastructure]] (also called /Dynamic Datacenter/).
|
@@ -1,10 +1,10 @@
|
|
1
|
-
h2. Anatomy of a BVP
|
2
|
-
|
3
|
-
Each BVP followed a simple, one-page template with the following parts:
|
4
|
-
|
5
|
-
* Customer Summary
|
6
|
-
* Storyboard
|
7
|
-
* Requirements
|
8
|
-
* Partner teams
|
9
|
-
|
10
|
-
The following sections walk through each section and give an example from one of our BVPs, "Resource-Smart Virtualization Infrastructure":http://windows/hyper-v/initiatives/Value%20Propositions/DynamicDatacenter-ValueProp.docx (also called _Dynamic Datacenter_).
|
1
|
+
h2. Anatomy of a BVP
|
2
|
+
|
3
|
+
Each BVP followed a simple, one-page template with the following parts:
|
4
|
+
|
5
|
+
* Customer Summary
|
6
|
+
* Storyboard
|
7
|
+
* Requirements
|
8
|
+
* Partner teams
|
9
|
+
|
10
|
+
The following sections walk through each section and give an example from one of our BVPs, "Resource-Smart Virtualization Infrastructure":http://windows/hyper-v/initiatives/Value%20Propositions/DynamicDatacenter-ValueProp.docx (also called _Dynamic Datacenter_).
|
@@ -1,26 +1,26 @@
|
|
1
|
-
TABLES
|
2
|
-
|
3
|
-
Different types of ORG tables.
|
4
|
-
|
5
|
-
* Simple table, no header.
|
6
|
-
|
7
|
-
| Cell one | Cell two |
|
8
|
-
| Cell three | Cell four |
|
9
|
-
|
10
|
-
|
11
|
-
* Indented table
|
12
|
-
|
13
|
-
| Cell one |
|
14
|
-
| Cell two |
|
15
|
-
|
16
|
-
And here's some paragraph content. The line breaks will need to get
|
17
|
-
removed here, but not for the tables.
|
18
|
-
|
19
|
-
* Table with header
|
20
|
-
|
21
|
-
| One | Two | Three |
|
22
|
-
|-------+-------+-------|
|
23
|
-
| Four | Five | Six |
|
24
|
-
| Seven | Eight | Nine |
|
25
|
-
|
26
|
-
The separator row should not get printed out.
|
1
|
+
TABLES
|
2
|
+
|
3
|
+
Different types of ORG tables.
|
4
|
+
|
5
|
+
* Simple table, no header.
|
6
|
+
|
7
|
+
| Cell one | Cell two |
|
8
|
+
| Cell three | Cell four |
|
9
|
+
|
10
|
+
|
11
|
+
* Indented table
|
12
|
+
|
13
|
+
| Cell one |
|
14
|
+
| Cell two |
|
15
|
+
|
16
|
+
And here's some paragraph content. The line breaks will need to get
|
17
|
+
removed here, but not for the tables.
|
18
|
+
|
19
|
+
* Table with header
|
20
|
+
|
21
|
+
| One | Two | Three |
|
22
|
+
|-------+-------+-------|
|
23
|
+
| Four | Five | Six |
|
24
|
+
| Seven | Eight | Nine |
|
25
|
+
|
26
|
+
The separator row should not get printed out.
|
@@ -1,23 +1,23 @@
|
|
1
|
-
TABLES
|
2
|
-
|
3
|
-
Different types of ORG tables.
|
4
|
-
|
5
|
-
h1. Simple table, no header.
|
6
|
-
|
7
|
-
| Cell one | Cell two |
|
8
|
-
| Cell three | Cell four |
|
9
|
-
|
10
|
-
h1. Indented table
|
11
|
-
|
12
|
-
| Cell one |
|
13
|
-
| Cell two |
|
14
|
-
|
15
|
-
And here's some paragraph content. The line breaks will need to get removed here, but not for the tables.
|
16
|
-
|
17
|
-
h1. Table with header
|
18
|
-
|
19
|
-
| One | Two | Three |
|
20
|
-
| Four | Five | Six |
|
21
|
-
| Seven | Eight | Nine |
|
22
|
-
|
23
|
-
The separator row should not get printed out.
|
1
|
+
TABLES
|
2
|
+
|
3
|
+
Different types of ORG tables.
|
4
|
+
|
5
|
+
h1. Simple table, no header.
|
6
|
+
|
7
|
+
| Cell one | Cell two |
|
8
|
+
| Cell three | Cell four |
|
9
|
+
|
10
|
+
h1. Indented table
|
11
|
+
|
12
|
+
| Cell one |
|
13
|
+
| Cell two |
|
14
|
+
|
15
|
+
And here's some paragraph content. The line breaks will need to get removed here, but not for the tables.
|
16
|
+
|
17
|
+
h1. Table with header
|
18
|
+
|
19
|
+
| One | Two | Three |
|
20
|
+
| Four | Five | Six |
|
21
|
+
| Seven | Eight | Nine |
|
22
|
+
|
23
|
+
The separator row should not get printed out.
|
@@ -1,21 +1,21 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), %w[spec_helper])
|
2
|
-
|
3
|
-
describe Orgmode::TextileOutputBuffer do
|
4
|
-
it "should substitute / with _" do
|
5
|
-
Orgmode::TextileOutputBuffer.new("").inline_formatting("/italic/").should eql("_italic_")
|
6
|
-
end
|
7
|
-
|
8
|
-
it "should convert simple links" do
|
9
|
-
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com]]").should \
|
10
|
-
eql("\"http://www.google.com\":http://www.google.com")
|
11
|
-
end
|
12
|
-
|
13
|
-
it "should convert links with text" do
|
14
|
-
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com][Google]]").should \
|
15
|
-
eql("\"Google\":http://www.google.com")
|
16
|
-
end
|
17
|
-
|
18
|
-
it "should convert spaces in urls" do
|
19
|
-
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[my url]]").should eql("\"my url\":my%20url")
|
20
|
-
end
|
21
|
-
end
|
1
|
+
require File.join(File.dirname(__FILE__), %w[spec_helper])
|
2
|
+
|
3
|
+
describe Orgmode::TextileOutputBuffer do
|
4
|
+
it "should substitute / with _" do
|
5
|
+
Orgmode::TextileOutputBuffer.new("").inline_formatting("/italic/").should eql("_italic_")
|
6
|
+
end
|
7
|
+
|
8
|
+
it "should convert simple links" do
|
9
|
+
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com]]").should \
|
10
|
+
eql("\"http://www.google.com\":http://www.google.com")
|
11
|
+
end
|
12
|
+
|
13
|
+
it "should convert links with text" do
|
14
|
+
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[http://www.google.com][Google]]").should \
|
15
|
+
eql("\"Google\":http://www.google.com")
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should convert spaces in urls" do
|
19
|
+
Orgmode::TextileOutputBuffer.new("").inline_formatting("[[my url]]").should eql("\"my url\":my%20url")
|
20
|
+
end
|
21
|
+
end
|