[DRE-commits] [ruby-org] 223/303: Handles an inline example without the need of a major mode.

Jérémy Bobbio lunar at alioth.debian.org
Fri Aug 9 17:34:02 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 25bbe22ed138b57a0cfef7e33f4acdbeafcd8c4d
Author: vonavi <ivvl82 at gmail.com>
Date:   Fri Jan 11 16:42:40 2013 +0300

    Handles an inline example without the need of a major mode.
---
 lib/org-ruby/line.rb          |    4 +---
 lib/org-ruby/output_buffer.rb |   11 ++++-------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/lib/org-ruby/line.rb b/lib/org-ruby/line.rb
index 272f6d7..0617a1b 100644
--- a/lib/org-ruby/line.rb
+++ b/lib/org-ruby/line.rb
@@ -242,7 +242,7 @@ module Orgmode
       when table_header?
         :table_header
       when inline_example?
-        :example_line
+        :inline_example
       when horizontal_rule?
         :horizontal_rule
       else :paragraph
@@ -260,8 +260,6 @@ module Orgmode
         :unordered_list
       when table?
         :table
-      when inline_example?
-        :inline_example
       when (block_type and block_type.casecmp("QUOTE") == 0)
         :blockquote
       when (block_type and block_type.casecmp("CENTER") == 0)
diff --git a/lib/org-ruby/output_buffer.rb b/lib/org-ruby/output_buffer.rb
index 67e51c2..e25878e 100644
--- a/lib/org-ruby/output_buffer.rb
+++ b/lib/org-ruby/output_buffer.rb
@@ -153,8 +153,8 @@ module Orgmode
 
     def boundary_of_block?(line)
       # Boundary of inline example
-      return true if ((line.paragraph_type == :example_line) ^
-                      (@output_type == :example_line))
+      return true if ((line.paragraph_type == :inline_example) ^
+                      (@output_type == :inline_example))
       # Boundary of begin...end block
       return true if (@output_type == :begin_block or
                       @output_type == :end_block)
@@ -194,11 +194,8 @@ module Orgmode
         # Open tag that precedes text immediately
         if (@list_indent_stack.empty? or
             @list_indent_stack.last <= line.indent)
-          # Don't push intrinsic mode of a block and inline example
-          unless (line.block_type or
-                  line.paragraph_type == :example_line)
-            push_mode(line.paragraph_type, line.indent)
-          end
+          # Don't push intrinsic mode of a block
+          push_mode(line.paragraph_type, line.indent) unless line.block_type
         end
       end
 

-- 
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