[DRE-commits] [ruby-org] 250/303: Slight changes.

Jérémy Bobbio lunar at alioth.debian.org
Fri Aug 9 17:34:07 UTC 2013


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch master
in repository ruby-org.

commit cd43acee849c93877d38c39f7ea646a01ffd33fb
Author: vonavi <ivvl82 at gmail.com>
Date:   Wed Jan 30 09:40:15 2013 +0200

    Slight changes.
---
 lib/org-ruby/html_output_buffer.rb |    4 ++--
 lib/org-ruby/parser.rb             |   14 +++++++-------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/org-ruby/html_output_buffer.rb b/lib/org-ruby/html_output_buffer.rb
index e55cad1..a76c069 100644
--- a/lib/org-ruby/html_output_buffer.rb
+++ b/lib/org-ruby/html_output_buffer.rb
@@ -110,7 +110,7 @@ module Orgmode
     def flush!
       case
       when preserve_whitespace?
-        strip_code_block if mode_is_code? current_mode
+        strip_code_block! if mode_is_code? current_mode
 
         # NOTE: CodeRay and Pygments already escape the html once, so
         # no need to escape_buffer!
@@ -325,7 +325,7 @@ module Orgmode
       $VERBOSE = warn_level
     end
 
-    def strip_code_block
+    def strip_code_block!
       code_indent = @code_indent_stack.shift
       strip_regexp = Regexp.new('\n' + ' ' * code_indent)
       @buffer.gsub!(strip_regexp, "\n")
diff --git a/lib/org-ruby/parser.rb b/lib/org-ruby/parser.rb
index 6396c96..7456d54 100644
--- a/lib/org-ruby/parser.rb
+++ b/lib/org-ruby/parser.rb
@@ -168,9 +168,9 @@ module Orgmode
       output = ""
       output_buffer = TextileOutputBuffer.new(output)
 
-      Parser.translate(@header_lines, output_buffer)
+      translate(@header_lines, output_buffer)
       @headlines.each do |headline|
-        Parser.translate(headline.body_lines, output_buffer)
+        translate(headline.body_lines, output_buffer)
       end
       output
     end
@@ -195,9 +195,9 @@ module Orgmode
         # If we're given a new title, then just create a new line
         # for that title.
         title = Line.new(@in_buffer_settings["TITLE"], self)
-        Parser.translate([title], output_buffer)
+        translate([title], output_buffer)
       end
-      Parser.translate(@header_lines, output_buffer) unless skip_header_lines?
+      translate(@header_lines, output_buffer) 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)
@@ -207,9 +207,9 @@ module Orgmode
         when :exclude
           # NOTHING
         when :headline_only
-          Parser.translate(headline.body_lines[0, 1], output_buffer)
+          translate(headline.body_lines[0, 1], output_buffer)
         when :all
-          Parser.translate(headline.body_lines, output_buffer)
+          translate(headline.body_lines, output_buffer)
         end
       end
       output << "\n"
@@ -223,7 +223,7 @@ module Orgmode
 
     # Converts an array of lines to the appropriate format.
     # Writes the output to +output_buffer+.
-    def self.translate(lines, output_buffer)
+    def translate(lines, output_buffer)
       output_buffer.output_type = :start
       lines.each { |line| output_buffer.insert(line) }
       output_buffer.flush!

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-org.git



More information about the Pkg-ruby-extras-commits mailing list