[DRE-commits] [ruby-org] 109/303: Merge ruediger changes
Jérémy Bobbio
lunar at alioth.debian.org
Fri Aug 9 17:33:38 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 0535742f51d2dc8f463029ca45b378a1c28ec48b
Merge: db2a99d 90dbb95
Author: Brian Dewey <bdewey at gmail.com>
Date: Sat Sep 3 11:48:57 2011 -0700
Merge ruediger changes
.gitignore | 3 +-
lib/org-ruby/html_output_buffer.rb | 62 +++++-
lib/org-ruby/html_symbol_replace.rb | 345 ++++++++++++++++++++++++++++++
lib/org-ruby/line.rb | 17 +-
lib/org-ruby/output_buffer.rb | 9 +-
lib/org-ruby/parser.rb | 55 +++--
lib/org-ruby/regexp_helper.rb | 16 ++
lib/org-ruby/textile_output_buffer.rb | 39 +++-
lib/org-ruby/textile_symbol_replace.rb | 345 ++++++++++++++++++++++++++++++
spec/html_examples/blockcomment.html | 3 +
spec/html_examples/blockcomment.org | 15 ++
spec/html_examples/center.html | 6 +
spec/html_examples/center.org | 7 +
spec/html_examples/deflist.html | 6 +
spec/html_examples/deflist.org | 6 +
spec/html_examples/footnotes.html | 10 +
spec/html_examples/footnotes.org | 7 +
spec/html_examples/subsupscript-nil.html | 3 +
spec/html_examples/subsupscript-nil.org | 6 +
spec/html_examples/subsupscript.html | 3 +
spec/html_examples/subsupscript.org | 5 +
spec/line_spec.rb | 4 +-
spec/textile_examples/center.org | 7 +
spec/textile_examples/center.textile | 6 +
spec/textile_examples/footnotes.org | 7 +
spec/textile_examples/footnotes.textile | 8 +
util/gen-special-replace.el | 37 ++++
27 files changed, 1007 insertions(+), 30 deletions(-)
diff --cc lib/org-ruby/html_output_buffer.rb
index 6a5a327,37efedd..d2ae9f7
--- a/lib/org-ruby/html_output_buffer.rb
+++ b/lib/org-ruby/html_output_buffer.rb
@@@ -145,8 -183,17 +183,17 @@@ module Orgmod
str = @re_help.rewrite_emphasis(str) do |marker, s|
"#{Tags[marker][:open]}#{s}#{Tags[marker][:close]}"
end
+ if @options[:use_sub_superscripts] then
+ str = @re_help.rewrite_subp(str) do |type, text|
+ if type == "_" then
+ "<sub>#{text}</sub>"
+ elsif type == "^" then
+ "<sup>#{text}</sup>"
+ end
+ end
+ end
str = @re_help.rewrite_images(str) do |link|
- "<img src=\"#{link}\" />"
+ "<a href=\"#{link}\"><img src=\"#{link}\" /></a>"
end
str = @re_help.rewrite_links(str) do |link, text|
text ||= link
diff --cc lib/org-ruby/line.rb
index 9901496,64396c6..3be7a68
--- a/lib/org-ruby/line.rb
+++ b/lib/org-ruby/line.rb
@@@ -53,10 -55,10 +55,10 @@@ module Orgmod
end
def plain_list?
- ordered_list? or unordered_list?
+ ordered_list? or unordered_list? or definition_list?
end
- UnorderedListRegexp = /^\s*(-|\+)\s*/
+ UnorderedListRegexp = /^\s*(-|\+)\s+/
def unordered_list?
check_assignment_or_regexp(:unordered_list, UnorderedListRegexp)
@@@ -66,7 -68,13 +68,13 @@@
@line.sub(UnorderedListRegexp, "")
end
+ DefinitionListRegexp = /^\s*(-|\+)\s*(.*?)::/
+
+ def definition_list?
+ check_assignment_or_regexp(:definition_list, DefinitionListRegexp)
+ end
+
- OrderedListRegexp = /^\s*\d+(\.|\))\s*/
+ OrderedListRegexp = /^\s*\d+(\.|\))\s+/
def ordered_list?
check_assignment_or_regexp(:ordered_list, OrderedListRegexp)
diff --cc lib/org-ruby/parser.rb
index b77e2ce,139a88c..c490872
--- a/lib/org-ruby/parser.rb
+++ b/lib/org-ruby/parser.rb
@@@ -103,13 -113,10 +114,14 @@@ module Orgmod
store_in_buffer_setting key, value
end
if line.table_separator? then
- previous_line.assigned_paragraph_type = :table_header if previous_line and previous_line.paragraph_type == :table_row
+ if previous_line and previous_line.paragraph_type == :table_row and !table_header_set
+ previous_line.assigned_paragraph_type = :table_header
+ table_header_set = true
+ end
end
+ table_header_set = false if !line.table?
mode = :code if line.begin_block? and line.block_type == "EXAMPLE"
+ mode = :block_comment if line.begin_block? and line.block_type == "COMMENT"
if (@current_headline) then
@current_headline.body_lines << line
else
--
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