wallyqs-org-ruby 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. data/.bnsignore +18 -0
  2. data/.gitignore +2 -0
  3. data/Gemfile +7 -0
  4. data/Gemfile.lock +36 -0
  5. data/History.txt +112 -0
  6. data/README.rdoc +67 -0
  7. data/Rakefile +33 -0
  8. data/TAGS +167 -0
  9. data/announcement.txt +24 -0
  10. data/bin/org-ruby +45 -0
  11. data/lib/org-ruby.rb +55 -0
  12. data/lib/org-ruby/headline.rb +110 -0
  13. data/lib/org-ruby/html_output_buffer.rb +273 -0
  14. data/lib/org-ruby/html_symbol_replace.rb +345 -0
  15. data/lib/org-ruby/line.rb +244 -0
  16. data/lib/org-ruby/output_buffer.rb +237 -0
  17. data/lib/org-ruby/parser.rb +366 -0
  18. data/lib/org-ruby/regexp_helper.rb +192 -0
  19. data/lib/org-ruby/textile_output_buffer.rb +102 -0
  20. data/lib/org-ruby/textile_symbol_replace.rb +346 -0
  21. data/lib/org-ruby/tilt.rb +29 -0
  22. data/org-ruby.gemspec +40 -0
  23. data/spec/data/freeform-example.org +113 -0
  24. data/spec/data/freeform.org +111 -0
  25. data/spec/data/hyp-planning.org +335 -0
  26. data/spec/data/remember.org +53 -0
  27. data/spec/headline_spec.rb +65 -0
  28. data/spec/html_examples/advanced-code.html +81 -0
  29. data/spec/html_examples/advanced-code.org +106 -0
  30. data/spec/html_examples/advanced-lists.html +31 -0
  31. data/spec/html_examples/advanced-lists.org +31 -0
  32. data/spec/html_examples/block_code.html +28 -0
  33. data/spec/html_examples/block_code.org +35 -0
  34. data/spec/html_examples/blockcomment.html +3 -0
  35. data/spec/html_examples/blockcomment.org +15 -0
  36. data/spec/html_examples/blockquote.html +7 -0
  37. data/spec/html_examples/blockquote.org +13 -0
  38. data/spec/html_examples/center.html +6 -0
  39. data/spec/html_examples/center.org +7 -0
  40. data/spec/html_examples/code-comment.html +18 -0
  41. data/spec/html_examples/code-comment.org +22 -0
  42. data/spec/html_examples/code-syntax.html +98 -0
  43. data/spec/html_examples/code-syntax.org +99 -0
  44. data/spec/html_examples/comment-trees.html +4 -0
  45. data/spec/html_examples/comment-trees.org +13 -0
  46. data/spec/html_examples/custom-seq-todo.html +15 -0
  47. data/spec/html_examples/custom-seq-todo.org +24 -0
  48. data/spec/html_examples/custom-todo.html +15 -0
  49. data/spec/html_examples/custom-todo.org +24 -0
  50. data/spec/html_examples/custom-typ-todo.html +15 -0
  51. data/spec/html_examples/custom-typ-todo.org +24 -0
  52. data/spec/html_examples/deflist.html +6 -0
  53. data/spec/html_examples/deflist.org +6 -0
  54. data/spec/html_examples/entities.html +4 -0
  55. data/spec/html_examples/entities.org +11 -0
  56. data/spec/html_examples/escape-pre.html +6 -0
  57. data/spec/html_examples/escape-pre.org +6 -0
  58. data/spec/html_examples/export-exclude-only.html +13 -0
  59. data/spec/html_examples/export-exclude-only.org +81 -0
  60. data/spec/html_examples/export-keywords.html +4 -0
  61. data/spec/html_examples/export-keywords.org +18 -0
  62. data/spec/html_examples/export-tags.html +8 -0
  63. data/spec/html_examples/export-tags.org +82 -0
  64. data/spec/html_examples/export-title.html +2 -0
  65. data/spec/html_examples/export-title.org +4 -0
  66. data/spec/html_examples/footnotes.html +10 -0
  67. data/spec/html_examples/footnotes.org +7 -0
  68. data/spec/html_examples/html-literal.html +2 -0
  69. data/spec/html_examples/html-literal.org +6 -0
  70. data/spec/html_examples/inline-formatting.html +20 -0
  71. data/spec/html_examples/inline-formatting.org +33 -0
  72. data/spec/html_examples/inline-images.html +10 -0
  73. data/spec/html_examples/inline-images.org +15 -0
  74. data/spec/html_examples/link-features.html +8 -0
  75. data/spec/html_examples/link-features.org +19 -0
  76. data/spec/html_examples/lists.html +23 -0
  77. data/spec/html_examples/lists.org +47 -0
  78. data/spec/html_examples/metadata-comment.html +27 -0
  79. data/spec/html_examples/metadata-comment.org +30 -0
  80. data/spec/html_examples/only-list.html +5 -0
  81. data/spec/html_examples/only-list.org +3 -0
  82. data/spec/html_examples/only-table.html +6 -0
  83. data/spec/html_examples/only-table.org +5 -0
  84. data/spec/html_examples/skip-header.html +3 -0
  85. data/spec/html_examples/skip-header.org +28 -0
  86. data/spec/html_examples/skip-table.html +4 -0
  87. data/spec/html_examples/skip-table.org +19 -0
  88. data/spec/html_examples/subsupscript-nil.html +3 -0
  89. data/spec/html_examples/subsupscript-nil.org +6 -0
  90. data/spec/html_examples/subsupscript.html +3 -0
  91. data/spec/html_examples/subsupscript.org +5 -0
  92. data/spec/html_examples/tables.html +35 -0
  93. data/spec/html_examples/tables.org +50 -0
  94. data/spec/html_examples/text.html +2 -0
  95. data/spec/html_examples/text.org +16 -0
  96. data/spec/line_spec.rb +155 -0
  97. data/spec/output_buffer_spec.rb +19 -0
  98. data/spec/parser_spec.rb +152 -0
  99. data/spec/regexp_helper_spec.rb +57 -0
  100. data/spec/spec_helper.rb +20 -0
  101. data/spec/textile_examples/block_code.org +35 -0
  102. data/spec/textile_examples/block_code.textile +29 -0
  103. data/spec/textile_examples/blockquote.org +13 -0
  104. data/spec/textile_examples/blockquote.textile +11 -0
  105. data/spec/textile_examples/center.org +7 -0
  106. data/spec/textile_examples/center.textile +6 -0
  107. data/spec/textile_examples/footnotes.org +7 -0
  108. data/spec/textile_examples/footnotes.textile +8 -0
  109. data/spec/textile_examples/keywords.org +13 -0
  110. data/spec/textile_examples/keywords.textile +11 -0
  111. data/spec/textile_examples/links.org +11 -0
  112. data/spec/textile_examples/links.textile +10 -0
  113. data/spec/textile_examples/lists.org +36 -0
  114. data/spec/textile_examples/lists.textile +20 -0
  115. data/spec/textile_examples/single-space-plain-list.org +13 -0
  116. data/spec/textile_examples/single-space-plain-list.textile +10 -0
  117. data/spec/textile_examples/tables.org +50 -0
  118. data/spec/textile_examples/tables.textile +40 -0
  119. data/spec/textile_output_buffer_spec.rb +21 -0
  120. data/tasks/test_case.rake +49 -0
  121. data/test/test_orgmode_parser.rb +0 -0
  122. data/util/gen-special-replace.el +37 -0
  123. metadata +244 -0
@@ -0,0 +1,53 @@
1
+ * New Ideas
2
+ ** YAML header in Webby
3
+
4
+ Make sure you don't have TABS here. Best practice: Configure your
5
+ editor to use spaces instaed of tabs, and if you can see whitespace,
6
+ even better.
7
+
8
+ In emacs, set indent-tabs-mode to NIL.
9
+ ** Ruby Gems behind Proxy
10
+
11
+ Set the following environment variable:
12
+
13
+ So, I added a User Variable for my account called http_proxy with
14
+ the value of http://<proxyserveraddress>:8080, rebooted, ran plan
15
+ old vanillia gem install rails –include-dependencies, and magically,
16
+ it worked
17
+ ** Hyper-V technical info
18
+
19
+ http://technet.microsoft.com/en-us/dd565807.aspx
20
+ ** VirtualBox
21
+
22
+ Virtualization software from Sun. Looks like it might be more for
23
+ dev/test. I'm surprised this hasn't popped at
24
+ all. http://www.virtualbox.org/. Backed by Sun.
25
+ ** Interesting LaTeX article
26
+
27
+ http://nitens.org/taraborelli/latex -- on the virtues of LaTeX
28
+ ** XEmacs / Emacs internals
29
+
30
+ Looks like an interesting resource if I want to learn how Emacs works.
31
+
32
+ http://www.xemacs.org/Documentation/21.5/html/internals_9.html#SEC19
33
+ ** MikTeX
34
+
35
+ Get it here: http://www.miktex.org/portable/
36
+ ** Orgmode publishing tutorial
37
+
38
+ [[http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php][Publishing Org-mode files to HTML]]
39
+ ** Git and Live Mesh
40
+
41
+ This is really helpful:
42
+ http://whereslou.com/2009/06/04/using-live-mesh-and-git-the-best-of-both-worlds
43
+ ** VDI deployment stats
44
+
45
+ Key takeaways:
46
+ - 74% are using VDI in production or pilot ... but 45% of those using have less than 100 users
47
+ - Upward of 55% of the DAC members [project] they will have up to 50% of their users using VDI in 3 years (~1/2 of those will have > 50%)
48
+ - No real surprises on the reasons / benefits etc
49
+ - Interestingly ... even if TS supported all client apps / supported user-install apps - 100% of the DAC preferred VDI over TS
50
+ - Most companies said a portion of their users would have VDI as the primary replacement desktop (60% < 20% of users, 32% 21-50% of users)
51
+ ** Hyper-V Scheduler Information
52
+
53
+ http://msdn.microsoft.com/en-us/library/bb969782.aspx
@@ -0,0 +1,65 @@
1
+
2
+ require File.join(File.dirname(__FILE__), %w[spec_helper])
3
+
4
+ describe Orgmode::Headline do
5
+
6
+ it "should recognize headlines that start with asterisks" do
7
+ Orgmode::Headline.headline?("*** test\n").should_not be_nil
8
+ end
9
+
10
+ it "should reject headlines without headlines at the start" do
11
+ Orgmode::Headline.headline?(" nope!").should be_nil
12
+ Orgmode::Headline.headline?(" tricked you!!!***").should be_nil
13
+ end
14
+
15
+ it "should reject improper initialization" do
16
+ lambda { Orgmode::Headline.new " tricked**" }.should raise_error
17
+ end
18
+
19
+ it "should properly determine headline level" do
20
+ samples = ["* one", "** two", "*** three", "**** four"]
21
+ expected = 1
22
+ samples.each do |sample|
23
+ h = Orgmode::Headline.new sample
24
+ h.level.should eql(expected)
25
+ expected += 1
26
+ end
27
+ end
28
+
29
+ it "should properly determine headline level with offset" do
30
+ h = Orgmode::Headline.new("* one", nil, 1)
31
+ h.level.should eql(2)
32
+ end
33
+
34
+ it "should find simple headline text" do
35
+ h = Orgmode::Headline.new "*** sample"
36
+ h.headline_text.should eql("sample")
37
+ end
38
+
39
+ it "should understand tags" do
40
+ h = Orgmode::Headline.new "*** sample :tag:tag2:\n"
41
+ h.headline_text.should eql("sample")
42
+ h.should have(2).tags
43
+ h.tags[0].should eql("tag")
44
+ h.tags[1].should eql("tag2")
45
+ end
46
+
47
+ it "should understand a single tag" do
48
+ h = Orgmode::Headline.new "*** sample :tag:\n"
49
+ h.headline_text.should eql("sample")
50
+ h.should have(1).tags
51
+ h.tags[0].should eql("tag")
52
+ end
53
+
54
+ it "should understand keywords" do
55
+ h = Orgmode::Headline.new "*** TODO Feed cat :home:"
56
+ h.headline_text.should eql("Feed cat")
57
+ h.keyword.should eql("TODO")
58
+ end
59
+
60
+ it "should recognize headlines marked as COMMENT" do
61
+ h = Orgmode::Headline.new "* COMMENT This headline is a comment"
62
+ h.comment_headline?.should_not be_nil
63
+ end
64
+ end
65
+
@@ -0,0 +1,81 @@
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
+ <span style="color:#777"># Finds all emphasis matches in a string.</span>
22
+ <span style="color:#777"># Supply a block that will get the marker and body as parameters.</span>
23
+ <span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">match_all</span>(str)
24
+ str.scan(<span style="color:#33B">@org_emphasis_regexp</span>) <span style="color:#080;font-weight:bold">do</span> |match|
25
+ <span style="color:#080;font-weight:bold">yield</span> <span style="color:#d70">$2</span>, <span style="color:#d70">$3</span>
26
+ <span style="color:#080;font-weight:bold">end</span>
27
+ <span style="color:#080;font-weight:bold">end</span>
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
+ <span style="color:#777"># Finds all emphasis matches in a string.</span>
34
+ <span style="color:#777"># Supply a block that will get the marker and body as parameters.</span>
35
+ <span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">match_all</span>(str)
36
+ str.scan(<span style="color:#33B">@org_emphasis_regexp</span>) <span style="color:#080;font-weight:bold">do</span> |match|
37
+ <span style="color:#080;font-weight:bold">yield</span> <span style="color:#d70">$2</span>, <span style="color:#d70">$3</span>
38
+ <span style="color:#080;font-weight:bold">end</span>
39
+ <span style="color:#080;font-weight:bold">end</span>
40
+ </code>
41
+ </pre>
42
+ <pre class="src">
43
+ <code class="clojure">
44
+ (<span style="color:#080;font-weight:bold">def</span> <span style="color:#06B;font-weight:bold">fib-seq</span>
45
+ (<span style="color:#080;font-weight:bold">concat</span>
46
+ [<span style="color:#00D">0</span> <span style="color:#00D">1</span>]
47
+ ((<span style="color:#080;font-weight:bold">fn</span> rfib [a b]
48
+ (lazy-cons (<span style="color:#080;font-weight:bold">+</span> a b) (rfib b (<span style="color:#080;font-weight:bold">+</span> a b)))) <span style="color:#00D">0</span> <span style="color:#00D">1</span>)))
49
+
50
+ user&gt; (<span style="color:#080;font-weight:bold">take</span> <span style="color:#00D">20</span> fib-seq)
51
+ (<span style="color:#00D">0</span> <span style="color:#00D">1</span> <span style="color:#00D">1</span> <span style="color:#00D">2</span> <span style="color:#00D">3</span> <span style="color:#00D">5</span> <span style="color:#00D">8</span> <span style="color:#00D">13</span> <span style="color:#00D">21</span> <span style="color:#00D">34</span> <span style="color:#00D">55</span> <span style="color:#00D">89</span> <span style="color:#00D">144</span> <span style="color:#00D">233</span> <span style="color:#00D">377</span> <span style="color:#00D">610</span> <span style="color:#00D">987</span> <span style="color:#00D">1597</span> <span style="color:#00D">2584</span> <span style="color:#00D">4181</span>)
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
+ <span style="color:#A60">:one</span> =&gt; <span style="color:#00D">1</span>,
68
+ <span style="color:#A60">:two</span> =&gt; <span style="color:#00D">2</span>
69
+ }
70
+ </code>
71
+ </pre>
72
+ <pre class="src">
73
+ <code class="clojure">
74
+ (defproject helloworld <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">0.1</span><span style="color:#710">&quot;</span></span>
75
+ <span style="color:#A60">:dependencies</span> [[org.clojure/clojure
76
+ <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">1.1.0-master-SNAPSHOT</span><span style="color:#710">&quot;</span></span>]
77
+ [org.clojure/clojure-contrib
78
+ <span style="background-color:hsla(0,100%,50%,0.05)"><span style="color:#710">&quot;</span><span style="color:#D20">1.0-SNAPSHOT</span><span style="color:#710">&quot;</span></span>]]
79
+ <span style="color:#A60">:main</span> helloworld)
80
+ </code>
81
+ </pre>
@@ -0,0 +1,106 @@
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
@@ -0,0 +1,31 @@
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>
@@ -0,0 +1,31 @@
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!
@@ -0,0 +1,28 @@
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>
@@ -0,0 +1,35 @@
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.
@@ -0,0 +1,3 @@
1
+ <p class="title">BLOCKCOMMENT</p>
2
+ <p>Testing that the next part is ignored</p>
3
+ <p>And now back to normal!</p>
@@ -0,0 +1,15 @@
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!