org-ruby 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. data/History.txt +6 -0
  2. data/bin/org-ruby +11 -5
  3. data/lib/org-ruby.rb +21 -23
  4. data/lib/org-ruby/headline.rb +0 -2
  5. data/lib/org-ruby/html_output_buffer.rb +60 -19
  6. data/lib/org-ruby/line.rb +9 -9
  7. data/lib/org-ruby/output_buffer.rb +9 -9
  8. data/lib/org-ruby/parser.rb +4 -1
  9. data/lib/org-ruby/regexp_helper.rb +3 -3
  10. metadata +66 -153
  11. data/.bnsignore +0 -18
  12. data/.gitignore +0 -2
  13. data/Gemfile +0 -8
  14. data/Gemfile.lock +0 -36
  15. data/Rakefile +0 -26
  16. data/TAGS +0 -133
  17. data/announcement.txt +0 -19
  18. data/org-ruby.gemspec +0 -37
  19. data/spec/data/freeform-example.org +0 -113
  20. data/spec/data/freeform.org +0 -111
  21. data/spec/data/hyp-planning.org +0 -335
  22. data/spec/data/remember.org +0 -53
  23. data/spec/headline_spec.rb +0 -65
  24. data/spec/html_examples/advanced-code.html +0 -81
  25. data/spec/html_examples/advanced-code.org +0 -106
  26. data/spec/html_examples/advanced-lists.html +0 -31
  27. data/spec/html_examples/advanced-lists.org +0 -31
  28. data/spec/html_examples/block_code.html +0 -28
  29. data/spec/html_examples/block_code.org +0 -35
  30. data/spec/html_examples/blockcomment.html +0 -3
  31. data/spec/html_examples/blockcomment.org +0 -15
  32. data/spec/html_examples/blockquote.html +0 -7
  33. data/spec/html_examples/blockquote.org +0 -13
  34. data/spec/html_examples/center.html +0 -6
  35. data/spec/html_examples/center.org +0 -7
  36. data/spec/html_examples/code-comment.html +0 -18
  37. data/spec/html_examples/code-comment.org +0 -22
  38. data/spec/html_examples/comment-trees.html +0 -4
  39. data/spec/html_examples/comment-trees.org +0 -13
  40. data/spec/html_examples/custom-seq-todo.html +0 -15
  41. data/spec/html_examples/custom-seq-todo.org +0 -24
  42. data/spec/html_examples/custom-todo.html +0 -15
  43. data/spec/html_examples/custom-todo.org +0 -24
  44. data/spec/html_examples/custom-typ-todo.html +0 -15
  45. data/spec/html_examples/custom-typ-todo.org +0 -24
  46. data/spec/html_examples/deflist.html +0 -6
  47. data/spec/html_examples/deflist.org +0 -6
  48. data/spec/html_examples/entities.html +0 -4
  49. data/spec/html_examples/entities.org +0 -11
  50. data/spec/html_examples/escape-pre.html +0 -6
  51. data/spec/html_examples/escape-pre.org +0 -6
  52. data/spec/html_examples/export-exclude-only.html +0 -13
  53. data/spec/html_examples/export-exclude-only.org +0 -81
  54. data/spec/html_examples/export-keywords.html +0 -4
  55. data/spec/html_examples/export-keywords.org +0 -18
  56. data/spec/html_examples/export-tags.html +0 -8
  57. data/spec/html_examples/export-tags.org +0 -82
  58. data/spec/html_examples/export-title.html +0 -2
  59. data/spec/html_examples/export-title.org +0 -4
  60. data/spec/html_examples/footnotes.html +0 -10
  61. data/spec/html_examples/footnotes.org +0 -7
  62. data/spec/html_examples/horizontal_rule.html +0 -4
  63. data/spec/html_examples/horizontal_rule.org +0 -5
  64. data/spec/html_examples/html-literal.html +0 -2
  65. data/spec/html_examples/html-literal.org +0 -6
  66. data/spec/html_examples/inline-formatting.html +0 -25
  67. data/spec/html_examples/inline-formatting.org +0 -43
  68. data/spec/html_examples/inline-images.html +0 -10
  69. data/spec/html_examples/inline-images.org +0 -15
  70. data/spec/html_examples/link-features.html +0 -20
  71. data/spec/html_examples/link-features.org +0 -35
  72. data/spec/html_examples/lists.html +0 -23
  73. data/spec/html_examples/lists.org +0 -47
  74. data/spec/html_examples/metadata-comment.html +0 -27
  75. data/spec/html_examples/metadata-comment.org +0 -30
  76. data/spec/html_examples/only-list.html +0 -5
  77. data/spec/html_examples/only-list.org +0 -3
  78. data/spec/html_examples/only-table.html +0 -6
  79. data/spec/html_examples/only-table.org +0 -5
  80. data/spec/html_examples/skip-header.html +0 -3
  81. data/spec/html_examples/skip-header.org +0 -28
  82. data/spec/html_examples/skip-table.html +0 -4
  83. data/spec/html_examples/skip-table.org +0 -19
  84. data/spec/html_examples/subsupscript-nil.html +0 -3
  85. data/spec/html_examples/subsupscript-nil.org +0 -6
  86. data/spec/html_examples/subsupscript.html +0 -3
  87. data/spec/html_examples/subsupscript.org +0 -5
  88. data/spec/html_examples/tables.html +0 -35
  89. data/spec/html_examples/tables.org +0 -50
  90. data/spec/html_examples/text.html +0 -2
  91. data/spec/html_examples/text.org +0 -16
  92. data/spec/line_spec.rb +0 -162
  93. data/spec/output_buffer_spec.rb +0 -19
  94. data/spec/parser_spec.rb +0 -158
  95. data/spec/regexp_helper_spec.rb +0 -57
  96. data/spec/spec_helper.rb +0 -20
  97. data/spec/textile_examples/block_code.org +0 -35
  98. data/spec/textile_examples/block_code.textile +0 -29
  99. data/spec/textile_examples/blockquote.org +0 -13
  100. data/spec/textile_examples/blockquote.textile +0 -11
  101. data/spec/textile_examples/center.org +0 -7
  102. data/spec/textile_examples/center.textile +0 -6
  103. data/spec/textile_examples/footnotes.org +0 -7
  104. data/spec/textile_examples/footnotes.textile +0 -8
  105. data/spec/textile_examples/keywords.org +0 -13
  106. data/spec/textile_examples/keywords.textile +0 -11
  107. data/spec/textile_examples/links.org +0 -11
  108. data/spec/textile_examples/links.textile +0 -10
  109. data/spec/textile_examples/lists.org +0 -36
  110. data/spec/textile_examples/lists.textile +0 -20
  111. data/spec/textile_examples/single-space-plain-list.org +0 -13
  112. data/spec/textile_examples/single-space-plain-list.textile +0 -10
  113. data/spec/textile_examples/tables.org +0 -50
  114. data/spec/textile_examples/tables.textile +0 -40
  115. data/spec/textile_output_buffer_spec.rb +0 -21
  116. data/tasks/test_case.rake +0 -49
  117. data/util/gen-special-replace.el +0 -37
@@ -1,81 +0,0 @@
1
- <p class="title">advanced-code.org</p>
2
- <p>Turns out there&#8217;s more way to do code than just BEGIN_EXAMPLE.</p>
3
- <h1><span class="heading-number heading-number-1">1 </span>Inline examples</h1>
4
- <p>This should work:</p>
5
- <pre class="example">
6
- fixed width? how does this work?
7
- ...........
8
- ............
9
- .
10
- . . . .
11
- . ..
12
- ....... .....
13
- . .
14
- ....
15
- </pre>
16
- <p>Two ASCII blobs.</p>
17
- <h1><span class="heading-number heading-number-1">2 </span>BEGIN_SRC</h1>
18
- <p>And this:</p>
19
- <pre class="src">
20
- <code class="ruby">
21
- # Finds all emphasis matches in a string.
22
- # Supply a block that will get the marker and body as parameters.
23
- def match_all(str)
24
- str.scan(@org_emphasis_regexp) do |match|
25
- yield $2, $3
26
- end
27
- end
28
- </code>
29
- </pre>
30
- <p>Now let&#8217;s test case-insensitive code blocks.</p>
31
- <pre class="src">
32
- <code class="ruby">
33
- # Finds all emphasis matches in a string.
34
- # Supply a block that will get the marker and body as parameters.
35
- def match_all(str)
36
- str.scan(@org_emphasis_regexp) do |match|
37
- yield $2, $3
38
- end
39
- end
40
- </code>
41
- </pre>
42
- <pre class="src">
43
- <code class="clojure">
44
- (def fib-seq
45
- (concat
46
- [0 1]
47
- ((fn rfib [a b]
48
- (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
49
-
50
- user&gt; (take 20 fib-seq)
51
- (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)
52
- </code>
53
- </pre>
54
- <p>Even if no language is set, it is still wrapped in code tags but class is empty.</p>
55
- <pre class="src">
56
- <code class="">
57
- echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers
58
- </code>
59
- </pre>
60
- <h1><span class="heading-number heading-number-1">3 </span>It should be possible to write a colon at the beginning of an example</h1>
61
- <blockquote>
62
- <p>I really love to write about :symbols. They sure are the best things in the world!</p>
63
- </blockquote>
64
- <pre class="src">
65
- <code class="ruby">
66
- {
67
- :one =&gt; 1,
68
- :two =&gt; 2
69
- }
70
- </code>
71
- </pre>
72
- <pre class="src">
73
- <code class="clojure">
74
- (defproject helloworld "0.1"
75
- :dependencies [[org.clojure/clojure
76
- "1.1.0-master-SNAPSHOT"]
77
- [org.clojure/clojure-contrib
78
- "1.0-SNAPSHOT"]]
79
- :main helloworld)
80
- </code>
81
- </pre>
@@ -1,106 +0,0 @@
1
- #+TITLE: advanced-code.org
2
- #+AUTHOR: Brian Dewey
3
- #+EMAIL: bdewey@gmail.com
4
- #+DATE: 2009-12-30 Wed
5
- #+DESCRIPTION: More types of code support
6
- #+KEYWORDS:
7
- #+LANGUAGE: en
8
- #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
9
- #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
10
- #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
11
- #+EXPORT_SELECT_TAGS: export
12
- #+EXPORT_EXCLUDE_TAGS: noexport
13
- #+LINK_UP:
14
- #+LINK_HOME:
15
-
16
- Turns out there's more way to do code than just BEGIN_EXAMPLE.
17
-
18
- * Inline examples
19
-
20
- This should work:
21
-
22
- : fixed width? how does this work?
23
- : ...........
24
- : ............
25
- : .
26
- : . . . .
27
- : . ..
28
- : ....... .....
29
- : . .
30
- : ....
31
-
32
- Two ASCII blobs.
33
-
34
- * BEGIN_SRC
35
- :PROPERTIES:
36
- :ARCHIVE_TIME: 2009-12-26 Sat 22:16
37
- :ARCHIVE_FILE: ~/brians-brain/content/projects/orgmode_parser.org
38
- :ARCHIVE_OLPATH: &lt;%= @page.title %&gt;/Future Development
39
- :ARCHIVE_CATEGORY: orgmode_parser
40
- :ARCHIVE_TODO: DONE
41
- :END:
42
-
43
- And this:
44
-
45
- #+BEGIN_SRC ruby
46
- # Finds all emphasis matches in a string.
47
- # Supply a block that will get the marker and body as parameters.
48
- def match_all(str)
49
- str.scan(@org_emphasis_regexp) do |match|
50
- yield $2, $3
51
- end
52
- end
53
- #+END_SRC
54
-
55
- Now let's test case-insensitive code blocks.
56
-
57
- #+begin_src ruby
58
- # Finds all emphasis matches in a string.
59
- # Supply a block that will get the marker and body as parameters.
60
- def match_all(str)
61
- str.scan(@org_emphasis_regexp) do |match|
62
- yield $2, $3
63
- end
64
- end
65
- #+end_src
66
-
67
- #+begin_src clojure
68
- (def fib-seq
69
- (concat
70
- [0 1]
71
- ((fn rfib [a b]
72
- (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
73
-
74
- user> (take 20 fib-seq)
75
- (0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)
76
- #+end_src
77
-
78
- Even if no language is set, it is still wrapped in code tags but class is empty.
79
-
80
- #+BEGIN_SRC
81
- echo 'Defaults env_keeps="http_proxy https_proxy ftp_proxy"' | sudo tee -a /etc/sudoers
82
- #+END_SRC
83
-
84
- * It should be possible to write a colon at the beginning of an example
85
-
86
- #+BEGIN_QUOTE
87
- I really love to write about
88
- :symbols. They sure are the
89
- best things in the world!
90
- #+END_QUOTE
91
-
92
- #+BEGIN_SRC ruby
93
- {
94
- :one => 1,
95
- :two => 2
96
- }
97
- #+END_SRC
98
-
99
- #+BEGIN_SRC clojure
100
- (defproject helloworld "0.1"
101
- :dependencies [[org.clojure/clojure
102
- "1.1.0-master-SNAPSHOT"]
103
- [org.clojure/clojure-contrib
104
- "1.0-SNAPSHOT"]]
105
- :main helloworld)
106
- #+END_SRC
@@ -1,31 +0,0 @@
1
- <p class="title">Advanced Lists</p>
2
- <p><code>org-ruby</code> supports the following list features of <code>org-mode</code>:</p>
3
- <h1>Nested lists</h1>
4
- <ul>
5
- <li>You can have nested lists</li>
6
- <li>This is first-level</li>
7
- <ul>
8
- <li>This is a nested item</li>
9
- <li>This is another nested item</li>
10
- </ul>
11
- <li>Back to the first level</li>
12
- <li>Another first level item</li>
13
- <ol>
14
- <li>This is a numbered list nested within the unordered list</li>
15
- <li>This is another numbered item</li>
16
- </ol>
17
- </ul>
18
- <p>Note the list ends just some more text. Make sure both list blocks are closed.</p>
19
- <h1>Multi-paragraph list items</h1>
20
- <p>This list will end with the end-of-file. Make sure all blocks are closed.</p>
21
- <ul>
22
- <li>This is a list item</li>
23
- <li>This list item has multiple paragraphs.</li>
24
- <p>This is paragraph two.</p>
25
- <p>And paragraph three.</p>
26
- <li>Back to a list item.</li>
27
- <ul>
28
- <li>Nested, just for grins!</li>
29
- <li>woo hoo!</li>
30
- </ul>
31
- </ul>
@@ -1,31 +0,0 @@
1
- Advanced Lists
2
-
3
- =org-ruby= supports the following list features of =org-mode=:
4
-
5
- * Nested lists
6
-
7
- - You can have nested lists
8
- - This is first-level
9
- - This is a nested item
10
- - This is another nested item
11
- - Back to the first level
12
- - Another first level item
13
- 1. This is a numbered list nested within the unordered list
14
- 2. This is another numbered item
15
-
16
- Note the list ends just some more text. Make sure both list blocks
17
- are closed.
18
-
19
- * Multi-paragraph list items
20
-
21
- This list will end with the end-of-file. Make sure all blocks are closed.
22
-
23
- - This is a list item
24
- - This list item has multiple paragraphs.
25
-
26
- This is paragraph two.
27
-
28
- And paragraph three.
29
- - Back to a list item.
30
- - Nested, just for grins!
31
- - woo hoo!
@@ -1,28 +0,0 @@
1
- <h1 class="title">Block Code</h1>
2
- <p>I need to get block code examples working. In <code>orgmode</code>, they look like this:</p>
3
- <pre class="example">
4
-
5
- def initialize(output)
6
- @output = output
7
- @buffer = ""
8
- @output_type = :start
9
- @list_indent_stack = []
10
- @paragraph_modifier = nil
11
-
12
- @logger = Logger.new(STDERR)
13
- @logger.level = Logger::WARN
14
- end
15
-
16
- </pre>
17
- <p>And now I should be back to normal text.</p>
18
- <p>Putting in another paragraph for good measure.</p>
19
- <p>Code should also get cancelled by a list, thus:</p>
20
- <pre class="example">
21
- This is my code!
22
-
23
- Another line!
24
- </pre>
25
- <ul>
26
- <li>My list should cancel this.</li>
27
- <li>Another list line.</li>
28
- </ul>
@@ -1,35 +0,0 @@
1
- * Block Code
2
-
3
- I need to get block code examples working. In =orgmode=, they look
4
- like this:
5
-
6
- #+BEGIN_EXAMPLE
7
-
8
- def initialize(output)
9
- @output = output
10
- @buffer = ""
11
- @output_type = :start
12
- @list_indent_stack = []
13
- @paragraph_modifier = nil
14
-
15
- @logger = Logger.new(STDERR)
16
- @logger.level = Logger::WARN
17
- end
18
-
19
- #+END_EXAMPLE
20
-
21
- And now I should be back to normal text.
22
-
23
- Putting in another paragraph for good measure.
24
-
25
-
26
- Code should also get cancelled by a list, thus:
27
-
28
- #+BEGIN_EXAMPLE
29
- This is my code!
30
-
31
- Another line!
32
- #+END_EXAMPLE
33
-
34
- - My list should cancel this.
35
- - Another list line.
@@ -1,3 +0,0 @@
1
- <p class="title">BLOCKCOMMENT</p>
2
- <p>Testing that the next part is ignored</p>
3
- <p>And now back to normal!</p>
@@ -1,15 +0,0 @@
1
- BLOCKCOMMENT
2
-
3
- Testing that the next part is ignored
4
-
5
- #+BEGIN_COMMENT
6
-
7
- /Foo/
8
-
9
- #+BEGIN_SRC c++
10
- int main() { }
11
- #+END_SRC
12
-
13
- #+END_COMMENT
14
-
15
- And now back to normal!
@@ -1,7 +0,0 @@
1
- <p class="title">BLOCKQUOTE</p>
2
- <p>Testing that I can have block quotes:</p>
3
- <blockquote>
4
- <p><i>Example:</i></p>
5
- <p>This is blockquote text.</p>
6
- </blockquote>
7
- <p>And now I&#8217;m back to normal text!</p>
@@ -1,13 +0,0 @@
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,6 +0,0 @@
1
- <p class="title">Fou</p>
2
- <p>not center</p>
3
- <div style="text-align: center">
4
- <p>center</p>
5
- </div>
6
- <p>not center, again</p>
@@ -1,7 +0,0 @@
1
- #+TITLE: Fou
2
-
3
- not center
4
- #+BEGIN_CENTER
5
- center
6
- #+END_CENTER
7
- not center, again
@@ -1,18 +0,0 @@
1
- <h1 class="title">Code Comment</h1>
2
- <p>I need to be able to export things that look like org-mode comments inside of code blocks, like this:</p>
3
- <pre class="example">
4
- #+TITLE: orgmode_parser.org
5
- #+AUTHOR:
6
- #+EMAIL: brian@BRIAN-DESK
7
- #+DATE: 2009-12-29 Tue
8
- #+DESCRIPTION:
9
- #+KEYWORDS:
10
- #+LANGUAGE: en
11
- #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t &lt;:t
12
- #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
13
- #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
14
- #+EXPORT_SELECT_TAGS: export
15
- #+EXPORT_EXCLUDE_TAGS: noexport
16
- #+LINK_UP:
17
- #+LINK_HOME:
18
- </pre>
@@ -1,22 +0,0 @@
1
- * Code Comment
2
-
3
- I need to be able to export things that look like org-mode comments
4
- inside of code blocks, like this:
5
-
6
- #+BEGIN_EXAMPLE
7
- #+TITLE: orgmode_parser.org
8
- #+AUTHOR:
9
- #+EMAIL: brian@BRIAN-DESK
10
- #+DATE: 2009-12-29 Tue
11
- #+DESCRIPTION:
12
- #+KEYWORDS:
13
- #+LANGUAGE: en
14
- #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
15
- #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
16
- #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
17
- #+EXPORT_SELECT_TAGS: export
18
- #+EXPORT_EXCLUDE_TAGS: noexport
19
- #+LINK_UP:
20
- #+LINK_HOME:
21
- #+END_EXAMPLE
22
-
@@ -1,4 +0,0 @@
1
- <h1 class="title">This headline is in the output</h1>
2
- <h1>This is in the output</h1>
3
- <h2>Yet, this is in the output</h2>
4
- <p>and this is also part of the output</p>
@@ -1,13 +0,0 @@
1
- * This headline is in the output
2
- * COMMENT Commented headline should not be in the output
3
- This should not be in the output either.
4
- ** This should not be in the output.
5
- *** Neither this
6
- **** nor this
7
- ** Not in the output
8
- * This is in the output
9
- ** COMMENT But this is not
10
- This is not in the output
11
- *** Neither is this
12
- ** Yet, this is in the output
13
- and this is also part of the output