vendor/bundle/ruby/2.1.0/gems/org-ruby-0.9.12/lib/org-ruby/output_buffer.rb
# This is the overall output buffer
This is the overall output buffer
This is the overall output buffer
def maintain_mode_stack(line)
      pop_mode if (mode_is_heading? current_mode or
                   current_mode == :paragraph or
                   current_mode == :horizontal_rule or
                   current_mode == :inline_example or
                   current_mode == :raw_text)
      if line.end_block? and @mode_stack.include? line.paragraph_type
        pop_mode until current_mode == line.paragraph_type
      end
      if ((not line.paragraph_type == :blank) or
          @output_type == :blank)
        while ((not @list_indent_stack.empty?) and
               @list_indent_stack.last >= line.indent and
               (not mode_is_block? current_mode))
          if (@list_indent_stack.last == line.indent and
              line.major_mode == current_mode)
            break
          else
            pop_mode
          end
        end
      end
      pop_mode if line.end_block? and line.paragraph_type == current_mode
      unless line.paragraph_type == :blank or line.assigned_paragraph_type == :comment
        if (@list_indent_stack.empty? or
            @list_indent_stack.last <= line.indent or
            mode_is_block? current_mode)
          if @list_indent_stack.last != line.indent or mode_is_block? current_mode
            push_mode(line.major_mode, line.indent) if line.major_mode
          end
          push_mode(line.paragraph_type, line.indent) unless line.end_block?
        end
      end
    end
def maintain_mode_stack ( line ) pop_mode if ( mode_is_heading? current_mode or current_mode == :paragraph or current_mode == :horizontal_rule or current_mode == :inline_example or current_mode == :raw_text ) if line . end_block? and @mode_stack . include? line . paragraph_type pop_mode until current_mode == line . paragraph_type end if ( ( not line . paragraph_type == :blank ) or @output_type == :blank ) while ( ( not @list_indent_stack . empty? ) and @list_indent_stack . last >= line . indent and ( not mode_is_block? current_mode ) ) if ( @list_indent_stack . last == line . indent and line . major_mode == current_mode ) break else pop_mode end end end pop_mode if line . end_block? and line . paragraph_type == current_mode unless line . paragraph_type == :blank or line . assigned_paragraph_type == :comment if ( @list_indent_stack . empty? or @list_indent_stack . last <= line . indent or mode_is_block? current_mode ) if @list_indent_stack . last != line . indent or mode_is_block? current_mode push_mode ( line . major_mode , line . indent ) if line . major_mode end push_mode ( line . paragraph_type , line . indent ) unless line . end_block? end end end
This is the overall output buffer
This is the overall output buffer
# Always close the following lines # End-block line closes every mode within block # Close previous tags on demand. Two blank lines close all tags. # Don't allow an arbitrary line to close block # Item can't close its major mode # Special case: Only end-block line closes block # Opens the major mode of line if it exists # Opens tag that precedes text immediately
line