diff --git a/History.txt b/History.txt index 58ee875..bdaa578 100644 --- a/History.txt +++ b/History.txt @@ -63,7 +63,7 @@ * Renamed the gem to org-ruby * Added +to_html+ for HTML output -* Now supports the following inline markup: +* Now supports the following inline markup: * bold * italic * code diff --git a/README.rdoc b/README.rdoc index 4445c12..f9ac860 100644 --- a/README.rdoc +++ b/README.rdoc @@ -8,7 +8,7 @@ This gem contains Ruby routines for parsing org-mode files.The most significant thing this library does today is convert org-mode files to HTML or textile. Currently, you cannot do much to customize the conversion. The supplied textile conversion is optimized for -extracting "content" from the orgfile as opposed to "metadata." +extracting "content" from the orgfile as opposed to "metadata." == FEATURES/PROBLEMS: @@ -34,7 +34,7 @@ From Ruby code: Orgmode::Parser.new(data) -...will construct a new +Parser+ object. +...will construct a new +Parser+ object. == INSTALL: diff --git a/announcement.txt b/announcement.txt index c78a0dc..cbe1621 100644 --- a/announcement.txt +++ b/announcement.txt @@ -8,7 +8,7 @@ This gem contains Ruby routines for parsing org-mode files.The most significant thing this library does today is convert org-mode files to HTML or textile. Currently, you cannot do much to customize the conversion. The supplied textile conversion is optimized for -extracting "content" from the orgfile as opposed to "metadata." +extracting "content" from the orgfile as opposed to "metadata." == CHANGES diff --git a/doc/fr_class_index.html b/doc/fr_class_index.html index ef89290..38ccbc5 100644 --- a/doc/fr_class_index.html +++ b/doc/fr_class_index.html @@ -1,6 +1,6 @@ - diff --git a/doc/fr_file_index.html b/doc/fr_file_index.html index 6363376..2bb1ab0 100644 --- a/doc/fr_file_index.html +++ b/doc/fr_file_index.html @@ -1,6 +1,6 @@ - diff --git a/doc/fr_method_index.html b/doc/fr_method_index.html index 7847406..e63c0aa 100644 --- a/doc/fr_method_index.html +++ b/doc/fr_method_index.html @@ -1,6 +1,6 @@ - diff --git a/lib/org-ruby/html_output_buffer.rb b/lib/org-ruby/html_output_buffer.rb index 0a4aa89..fc0e31e 100644 --- a/lib/org-ruby/html_output_buffer.rb +++ b/lib/org-ruby/html_output_buffer.rb @@ -51,7 +51,7 @@ def push_mode(mode, opts={}) css_class = "" css_class = " class=\"src\"" if [:src, :include_src].include? mode css_class = " class=\"example\"" if (mode == :example || mode == :inline_example) - @logger.debug "#{mode}: <#{ModeTag[mode]}#{css_class}>\n" + @logger.debug "#{mode}: <#{ModeTag[mode]}#{css_class}>\n" @output << "<#{ModeTag[mode]}#{css_class}>\n" unless mode == :table and skip_tables? # Entering a new mode obliterates the title decoration @title_decoration = "" @@ -82,7 +82,7 @@ def flush! unless buffer_mode_is_table? and skip_tables? @logger.debug "FLUSH ==========> #{@buffer_mode}" output_indentation - @output << "<#{HtmlBlockTag[@output_type]}#{@title_decoration}>" + @output << "<#{HtmlBlockTag[@output_type]}#{@title_decoration}>" if (@buffered_lines[0].kind_of?(Headline)) then headline = @buffered_lines[0] raise "Cannot be more than one headline!" if @buffered_lines.length > 1 @@ -96,7 +96,7 @@ def flush! output << "#{keyword} " end end - @output << inline_formatting(@buffer) + @output << inline_formatting(@buffer) @output << "#{HtmlBlockTag[@output_type]}>\n" @title_decoration = "" else @@ -148,13 +148,13 @@ def inline_formatting(str) format_tables!(str) str end - + def format_emphasis(str) @re_help.rewrite_emphasis(str) do |marker, s| "#{Tags[marker][:open]}#{s}#{Tags[marker][:close]}" end end - + def format_links(str) @re_help.rewrite_links(str) do |link, text| if link =~ /(?:jpg|jpeg|gif|png)$/ @@ -162,9 +162,9 @@ def format_links(str) else text ||= link link = link.sub(/^file:(.*)::(.*?)$/) do - + # We don't support search links right now. Get rid of it. - + "file:#{$1}" end link = link.sub(/^file:/i, "") # will default to HTTP diff --git a/lib/org-ruby/line.rb b/lib/org-ruby/line.rb index cbb46a9..22526e9 100644 --- a/lib/org-ruby/line.rb +++ b/lib/org-ruby/line.rb @@ -105,7 +105,7 @@ def table_separator? check_assignment_or_regexp(:table_separator, /^\s*\|[-\|\+]*\s*$/) end - # Checks if this line is a table header. + # Checks if this line is a table header. def table_header? @assigned_paragraph_type == :table_header end @@ -200,7 +200,7 @@ def self.to_textile(lines) # What's tricky is lines can have assigned types, so you need to check # the assigned type, if present, or see if the characteristic regexp # for the paragraph type matches if not present. - # + # # call-seq: # check_assignment_or_regexp(assignment, regexp) => boolean # diff --git a/lib/org-ruby/output_buffer.rb b/lib/org-ruby/output_buffer.rb index 81ff602..62d7c49 100644 --- a/lib/org-ruby/output_buffer.rb +++ b/lib/org-ruby/output_buffer.rb @@ -23,7 +23,7 @@ class OutputBuffer # This is the overall output buffer attr_reader :output - # This is the current type of output being accumulated. + # This is the current type of output being accumulated. attr_accessor :output_type # This stack is used to do proper outline numbering of headlines. @@ -82,7 +82,7 @@ def prepare(line) if not should_accumulate_output?(line) then flush! maintain_list_indent_stack(line) - @output_type = line.paragraph_type + @output_type = line.paragraph_type end push_mode(:inline_example) if line.inline_example? and current_mode != :inline_example pop_mode(:inline_example) if current_mode == :inline_example && !line.inline_example? @@ -92,7 +92,7 @@ def prepare(line) @buffered_lines.push(line) end - # Flushes everything currently in the accumulation buffer into the + # Flushes everything currently in the accumulation buffer into the # output buffer. Derived classes must override this to actually move # content into the output buffer with the appropriate markup. This # method just does common bookkeeping cleanup. @@ -140,7 +140,7 @@ def << (str) @buffer << str end - # Gets the current list indent level. + # Gets the current list indent level. def list_indent_level @list_indent_stack.length end @@ -165,7 +165,7 @@ def mode_is_code(mode) def maintain_list_indent_stack(line) if (line.plain_list?) then while (not @list_indent_stack.empty? \ - and (@list_indent_stack.last > line.indent)) + and (@list_indent_stack.last > line.indent)) @list_indent_stack.pop pop_mode end @@ -205,7 +205,7 @@ def should_accumulate_output?(line) # Special case: Multiple blank lines get accumulated. return true if line.paragraph_type == :blank and @output_type == :blank - + # Currently only "paragraphs" get accumulated with previous output. return false unless line.paragraph_type == :paragraph if ((@output_type == :ordered_list) or diff --git a/lib/org-ruby/parser.rb b/lib/org-ruby/parser.rb index 1c4e4d6..39722e9 100644 --- a/lib/org-ruby/parser.rb +++ b/lib/org-ruby/parser.rb @@ -165,7 +165,7 @@ def to_html(output_buffer_class=HtmlOutputBuffer) export_options[:skip_tables] = true if not export_tables? output = "" output_buffer = output_buffer_class.new(output, export_options) - + if @in_buffer_settings["TITLE"] then # If we're given a new title, then just create a new line @@ -174,7 +174,7 @@ def to_html(output_buffer_class=HtmlOutputBuffer) Parser.translate([title], output_buffer, filename) end Parser.translate(@header_lines, output_buffer, filename) unless skip_header_lines? - + # If we've output anything at all, remove the :decorate_title option. export_options.delete(:decorate_title) if (output.length > 0) @headlines.each do |headline| @@ -217,10 +217,10 @@ def self.translate(lines, output_buffer, filename=nil) when :metadata, :table_separator, :blank - output_buffer << line.line if output_buffer.preserve_whitespace? + output_buffer << line.line if output_buffer.preserve_whitespace? when :comment - + if line.begin_block? output_buffer.push_mode(:blockquote) if line.block_type == "QUOTE" output_buffer.push_mode(:src) if line.block_type == "SRC" @@ -238,7 +238,7 @@ def self.translate(lines, output_buffer, filename=nil) output_buffer << line.line.lstrip when :unordered_list, :ordered_list - + output_buffer << line.output_text << " " when :inline_example diff --git a/lib/org-ruby/regexp_helper.rb b/lib/org-ruby/regexp_helper.rb index 6d9fc0d..64b7815 100644 --- a/lib/org-ruby/regexp_helper.rb +++ b/lib/org-ruby/regexp_helper.rb @@ -3,7 +3,7 @@ module Orgmode # = Summary - # + # # This class contains helper routines to deal with the Regexp "black # magic" you need to properly parse org-mode files. # @@ -120,7 +120,7 @@ def rewrite_emphasis(str) # output format. # # = Usage - # + # # Give this a block that expect the link and optional friendly # text. Return how that link should get formatted. # @@ -153,7 +153,7 @@ def rewrite_links(str) # :yields: link, text end end end - + # Rewrites all of the inline image tags. def rewrite_images(str) # :yields: image_link raise "Do not use rewrite_images, use rewrite_links instead!" @@ -163,7 +163,7 @@ def rewrite_images(str) # :yields: image_link def build_org_emphasis_regexp @org_emphasis_regexp = Regexp.new("([#{@pre_emphasis}]|^)\n" + - "( [#{@markers}] )\n" + + "( [#{@markers}] )\n" + "( [^#{@border_forbidden}] | " + " [^#{@border_forbidden}]#{@body_regexp}[^#{@border_forbidden}] )\n" + "\\2\n" + diff --git a/spec/data/freeform-example.org b/spec/data/freeform-example.org index 781c6dd..143b489 100644 --- a/spec/data/freeform-example.org +++ b/spec/data/freeform-example.org @@ -1,18 +1,18 @@ #+BEGIN_EXAMPLE #+TITLE: Freeform -#+AUTHOR: +#+AUTHOR: #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-20 Sun -#+DESCRIPTION: -#+KEYWORDS: +#+DESCRIPTION: +#+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+LINK_UP: -#+LINK_HOME: +#+LINK_UP: +#+LINK_HOME: #+END_EXAMPLE Freeform @@ -71,7 +71,7 @@ the Freeform project. CLOCK: [2009-11-28 Sat 22:44]--[2009-11-28 Sat 23:50] => 1:06 I'm now at the point where I *list* versions, but I can't show - them. + them. - [X] I currently suspect that I broke my version recovery code when I switched the order of the idea_changes. I need to diff --git a/spec/data/freeform.org b/spec/data/freeform.org index a752689..c3d7537 100644 --- a/spec/data/freeform.org +++ b/spec/data/freeform.org @@ -1,17 +1,17 @@ #+TITLE: Freeform -#+AUTHOR: +#+AUTHOR: #+EMAIL: bdewey@gmail.com #+DATE: 2009-12-20 Sun -#+DESCRIPTION: -#+KEYWORDS: +#+DESCRIPTION: +#+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+LINK_UP: -#+LINK_HOME: +#+LINK_UP: +#+LINK_HOME: Freeform This is my todo list, research file, and log record from working on @@ -69,7 +69,7 @@ the Freeform project. CLOCK: [2009-11-28 Sat 22:44]--[2009-11-28 Sat 23:50] => 1:06 I'm now at the point where I *list* versions, but I can't show - them. + them. - [X] I currently suspect that I broke my version recovery code when I switched the order of the idea_changes. I need to diff --git a/spec/data/hyp-planning.org b/spec/data/hyp-planning.org index 1461022..c650498 100644 --- a/spec/data/hyp-planning.org +++ b/spec/data/hyp-planning.org @@ -2,16 +2,16 @@ #+AUTHOR: Brian Dewey #+EMAIL: bdewey@microsoft.com #+DATE: December 9, 2009 -#+DESCRIPTION: -#+KEYWORDS: +#+DESCRIPTION: +#+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:nil #+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:nil pri:nil tags:nil #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport -#+LINK_UP: -#+LINK_HOME: +#+LINK_UP: +#+LINK_HOME: * DONE Introduction CLOSED: [2009-12-09 Wed 15:18] @@ -39,7 +39,7 @@ - 19 different value propositions - - 159 one-page specs + - 159 one-page specs - A 770-line spreadsheet containing dev estimates @@ -61,7 +61,7 @@ One of the first pre-planning activities we did in Hyper-V was define a set of /business value propositions/ (BVPs). A business value proposition is an end-to-end hook that can convince a customer that - Windows 8 is worth buying. + Windows 8 is worth buying. Our BVPs are stored in the [[http://windows/hyper-v/initiatives/Value%20Propositions/Forms/AllItems.aspx][Hyper-V Portal]]. @@ -69,7 +69,7 @@ Each BVP followed a simple, one-page template with the following parts: - + - Customer Summary - Storyboard - Requirements @@ -78,7 +78,7 @@ The following sections walk through each section and give an example from one of our BVPs, [[http://windows/hyper-v/initiatives/Value Propositions/DynamicDatacenter-ValueProp.docx][Resource-Smart Virtualization Infrastructure]] (also called /Dynamic Datacenter/). - + *** Customer Summary @@ -90,7 +90,7 @@ #+BEGIN_QUOTE /Example:/ - + I want to add or remove computing resources to company owned virtualization infrastructure automatically, on-demand in response to rapidly changing business needs without any loss of @@ -153,7 +153,7 @@ #+END_QUOTE - + *** Partner teams @@ -321,7 +321,7 @@ | Appliance Development Model | Infrastructure Scaled... (Virtual Appliance for Partners) | - + * TODO Conclusion diff --git a/spec/html_examples/advanced-code.html b/spec/html_examples/advanced-code.html index 16e8dc3..00c8cb3 100644 --- a/spec/html_examples/advanced-code.html +++ b/spec/html_examples/advanced-code.html @@ -3,7 +3,7 @@
This should work:
- fixed width? how does this work?
+ fixed width? how does this work?
...........
............
.
diff --git a/spec/html_examples/advanced-code.org b/spec/html_examples/advanced-code.org
index dc685d3..39538bc 100644
--- a/spec/html_examples/advanced-code.org
+++ b/spec/html_examples/advanced-code.org
@@ -3,23 +3,23 @@
#+EMAIL: bdewey@gmail.com
#+DATE: 2009-12-30 Wed
#+DESCRIPTION: More types of code support
-#+KEYWORDS:
+#+KEYWORDS:
#+LANGUAGE: en
#+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
-#+LINK_UP:
-#+LINK_HOME:
+#+LINK_UP:
+#+LINK_HOME:
-Turns out there's more way to do code than just BEGIN_EXAMPLE.
+Turns out there's more way to do code than just BEGIN_EXAMPLE.
* Inline examples
This should work:
-: fixed width? how does this work?
+: fixed width? how does this work?
: ...........
: ............
: .
diff --git a/spec/html_examples/code-comment.html b/spec/html_examples/code-comment.html
index 7e48ae2..4b5adbb 100644
--- a/spec/html_examples/code-comment.html
+++ b/spec/html_examples/code-comment.html
@@ -2,17 +2,17 @@ Code Comment
I need to be able to export things that look like org-mode comments inside of code blocks, like this:
#+TITLE: orgmode_parser.org
-#+AUTHOR:
+#+AUTHOR:
#+EMAIL: brian@BRIAN-DESK
#+DATE: 2009-12-29 Tue
-#+DESCRIPTION:
-#+KEYWORDS:
+#+DESCRIPTION:
+#+KEYWORDS:
#+LANGUAGE: en
#+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
-#+LINK_UP:
-#+LINK_HOME:
+#+LINK_UP:
+#+LINK_HOME:
diff --git a/spec/html_examples/code-comment.org b/spec/html_examples/code-comment.org
index 6eb5a3c..c7f437f 100644
--- a/spec/html_examples/code-comment.org
+++ b/spec/html_examples/code-comment.org
@@ -5,18 +5,18 @@ inside of code blocks, like this:
#+BEGIN_EXAMPLE
#+TITLE: orgmode_parser.org
-#+AUTHOR:
+#+AUTHOR:
#+EMAIL: brian@BRIAN-DESK
#+DATE: 2009-12-29 Tue
-#+DESCRIPTION:
-#+KEYWORDS:
+#+DESCRIPTION:
+#+KEYWORDS:
#+LANGUAGE: en
#+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:nil skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
-#+LINK_UP:
-#+LINK_HOME:
+#+LINK_UP:
+#+LINK_HOME:
#+END_EXAMPLE
diff --git a/spec/html_examples/escape-pre.html b/spec/html_examples/escape-pre.html
index 0671519..125df07 100644
--- a/spec/html_examples/escape-pre.html
+++ b/spec/html_examples/escape-pre.html
@@ -1,6 +1,6 @@
-<li>[ ] “smart quotes”</li>
-<li>[ ] I think I need this for ‘single quotes’ too. Don’t I?</li>
-<li>[ ] Em dashes would be great — wouldn’t they?</li>
-<li>[ ] I hope to develop an en dash sometime in 2010 – 2011.</li>
+<li>[ ] “smart quotes”</li>
+<li>[ ] I think I need this for ‘single quotes’ too. Don’t I?</li>
+<li>[ ] Em dashes would be great — wouldn’t they?</li>
+<li>[ ] I hope to develop an en dash sometime in 2010 – 2011.</li>
diff --git a/spec/html_examples/escape-pre.org b/spec/html_examples/escape-pre.org
index abcb4a7..dea9e35 100644
--- a/spec/html_examples/escape-pre.org
+++ b/spec/html_examples/escape-pre.org
@@ -1,6 +1,6 @@
#+BEGIN_EXAMPLE
-