[DRE-commits] [ruby-org] 149/303: Whitespace cleanup
Jérémy Bobbio
lunar at alioth.debian.org
Fri Aug 9 17:33:47 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 f230794cb28b35512fdf6cd3cac0f81606666f0b
Author: Waldemar Quevedo <waldemar.quevedo at gmail.com>
Date: Sun Jun 10 23:46:49 2012 +0900
Whitespace cleanup
---
lib/org-ruby/html_output_buffer.rb | 6 +++---
lib/org-ruby/line.rb | 4 ++--
lib/org-ruby/output_buffer.rb | 12 ++++++------
lib/org-ruby/regexp_helper.rb | 6 +++---
spec/headline_spec.rb | 1 -
spec/line_spec.rb | 4 ++--
spec/parser_spec.rb | 1 -
spec/spec_helper.rb | 2 --
8 files changed, 16 insertions(+), 20 deletions(-)
diff --git a/lib/org-ruby/html_output_buffer.rb b/lib/org-ruby/html_output_buffer.rb
index aa67253..a29f3d9 100644
--- a/lib/org-ruby/html_output_buffer.rb
+++ b/lib/org-ruby/html_output_buffer.rb
@@ -57,7 +57,7 @@ module Orgmode
css_class = " class=\"src\"" if mode == :src
css_class = " class=\"example\"" if (mode == :example || mode == :inline_example)
css_class = " style=\"text-align: center\"" if mode == :center
- @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?
# Special case to add code tags to src blogs and specify language
if mode == :src
@@ -127,7 +127,7 @@ module Orgmode
output << "<span class=\"todo-keyword #{keyword}\">#{keyword} </span>"
end
end
- @output << inline_formatting(@buffer)
+ @output << inline_formatting(@buffer)
@output << "</#{HtmlBlockTag[@output_type]}>\n"
@title_decoration = ""
else
@@ -217,7 +217,7 @@ module Orgmode
link = link.sub(/^file:/i, "") # will default to HTTP
unless link.match(/:\/\/[^\/]*.org$/)
- link = link.sub(/\.org$/i, ".html")
+ link = link.sub(/\.org$/i, ".html")
end
text = text.gsub(/([^\]]*\.(jpg|jpeg|gif|png))/xi) do |img_link|
diff --git a/lib/org-ruby/line.rb b/lib/org-ruby/line.rb
index 131fda6..00d9bb9 100644
--- a/lib/org-ruby/line.rb
+++ b/lib/org-ruby/line.rb
@@ -137,7 +137,7 @@ module Orgmode
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
@@ -234,7 +234,7 @@ module Orgmode
# 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 aedaa59..e2ac05e 100644
--- a/lib/org-ruby/output_buffer.rb
+++ b/lib/org-ruby/output_buffer.rb
@@ -23,7 +23,7 @@ module Orgmode
# 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.
@@ -83,7 +83,7 @@ module Orgmode
@block_lang = line.block_lang if line.begin_block? and line.code_block_type?
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 and not line.property_drawer?
pop_mode(:inline_example) if current_mode == :inline_example and !line.inline_example?
@@ -94,7 +94,7 @@ module Orgmode
@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.
@@ -142,7 +142,7 @@ module Orgmode
@buffer << str
end
- # Gets the current list indent level.
+ # Gets the current list indent level.
def list_indent_level
@list_indent_stack.length
end
@@ -167,7 +167,7 @@ module Orgmode
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
@@ -212,7 +212,7 @@ module Orgmode
# 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/regexp_helper.rb b/lib/org-ruby/regexp_helper.rb
index 0a48762..22d1fb4 100644
--- a/lib/org-ruby/regexp_helper.rb
+++ b/lib/org-ruby/regexp_helper.rb
@@ -3,7 +3,7 @@ require 'logger'
module Orgmode
# = Summary
- #
+ #
# This class contains helper routines to deal with the Regexp "black
# magic" you need to properly parse org-mode files.
#
@@ -121,7 +121,7 @@ module Orgmode
# output format.
#
# = Usage
- #
+ #
# Give this a block that expect the link and optional friendly
# text. Return how that link should get formatted.
#
@@ -161,7 +161,7 @@ module Orgmode
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/headline_spec.rb b/spec/headline_spec.rb
index 7b7103b..50cb19a 100644
--- a/spec/headline_spec.rb
+++ b/spec/headline_spec.rb
@@ -1,4 +1,3 @@
-
require File.join(File.dirname(__FILE__), %w[spec_helper])
describe Orgmode::Headline do
diff --git a/spec/line_spec.rb b/spec/line_spec.rb
index 55893d1..789fc88 100644
--- a/spec/line_spec.rb
+++ b/spec/line_spec.rb
@@ -42,7 +42,7 @@ describe Orgmode::Line do
line.plain_list?.should be_true
end
end
-
+
["-foo", "+foo", "1.foo", "2.foo"].each do |invalid_list|
it "should not recognize this invalid list: '#{invalid_list}'" do
line = Orgmode::Line.new invalid_list
@@ -119,7 +119,7 @@ describe Orgmode::Line do
l = Orgmode::Line.new key
l.paragraph_type.should eql(value)
l.assigned_paragraph_type = :paragraph
- l.paragraph_type.should eql(:paragraph)
+ l.paragraph_type.should eql(:paragraph)
l.assigned_paragraph_type = nil
l.paragraph_type.should eql(value)
end
diff --git a/spec/parser_spec.rb b/spec/parser_spec.rb
index f22ba5f..7557ccb 100644
--- a/spec/parser_spec.rb
+++ b/spec/parser_spec.rb
@@ -1,4 +1,3 @@
-
require File.join(File.dirname(__FILE__), %w[spec_helper])
describe Orgmode::Parser do
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index fd37bc6..d350757 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -1,4 +1,3 @@
-
require File.expand_path(
File.join(File.dirname(__FILE__), %w[.. lib org-ruby]))
@@ -17,4 +16,3 @@ RSpec.configure do |config|
# config.mock_with :flexmock
# config.mock_with :rr
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