org-ruby 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- org-ruby (0.6.1)
4
+ org-ruby (0.6.3)
5
5
  rubypants (>= 0.2.0)
6
6
 
7
7
  GEM
@@ -15,14 +15,14 @@ GEM
15
15
  little-plugger (1.1.3)
16
16
  loquacious (1.9.1)
17
17
  rake (0.9.2.2)
18
- rspec (2.9.0)
19
- rspec-core (~> 2.9.0)
20
- rspec-expectations (~> 2.9.0)
21
- rspec-mocks (~> 2.9.0)
22
- rspec-core (2.9.0)
23
- rspec-expectations (2.9.1)
18
+ rspec (2.10.0)
19
+ rspec-core (~> 2.10.0)
20
+ rspec-expectations (~> 2.10.0)
21
+ rspec-mocks (~> 2.10.0)
22
+ rspec-core (2.10.1)
23
+ rspec-expectations (2.10.0)
24
24
  diff-lcs (~> 1.1.3)
25
- rspec-mocks (2.9.0)
25
+ rspec-mocks (2.10.1)
26
26
  rubypants (0.2.0)
27
27
  tilt (1.3.3)
28
28
 
data/History.txt CHANGED
@@ -1,4 +1,8 @@
1
- == 0.6.2 / 2012-04-14
1
+ == 0.6.3 / 2012-05-22
2
+
3
+ * Minor enhancement: Correct handling of .org URIs in HTML markup routine (thanks, rayl)
4
+
5
+ == 0.6.1 / 2012-04-14
2
6
 
3
7
  * Added encoding directive to support Ruby 1.9.2
4
8
  * Headlines with the COMMENT keyword, and the PROPERTIES drawer are not exported
data/lib/org-ruby.rb CHANGED
@@ -3,7 +3,7 @@ unless defined? ::OrgRuby
3
3
  module OrgRuby
4
4
 
5
5
  # :stopdoc:
6
- VERSION = '0.6.2'
6
+ VERSION = '0.6.3'
7
7
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
8
8
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
9
9
  # :startdoc:
@@ -215,7 +215,11 @@ module Orgmode
215
215
  "file:#{$1}"
216
216
  end
217
217
  link = link.sub(/^file:/i, "") # will default to HTTP
218
- link = link.sub(/\.org$/i, ".html")
218
+
219
+ unless link.match(/:\/\/[^\/]*.org$/)
220
+ link = link.sub(/\.org$/i, ".html")
221
+ end
222
+
219
223
  text = text.gsub(/([^\]]*\.(jpg|jpeg|gif|png))/xi) do |img_link|
220
224
  "<img src=\"#{img_link}\" />"
221
225
  end
data/org-ruby.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "org-ruby"
5
- s.version = "0.6.2"
5
+ s.version = "0.6.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Brian Dewey"]
9
- s.date = "2012-04-14"
9
+ s.date = "2012-05-22"
10
10
  s.description = "This gem contains Ruby routines for parsing org-mode files.The most\nsignificant thing this library does today is convert org-mode files to\nHTML or textile. Currently, you cannot do much to customize the\nconversion. The supplied textile conversion is optimized for\nextracting \"content\" from the orgfile as opposed to \"metadata.\" "
11
11
  s.email = "bdewey@gmail.com"
12
12
  s.executables = ["org-ruby"]
13
13
  s.extra_rdoc_files = ["History.txt", "README.rdoc", "announcement.txt", "bin/org-ruby"]
14
- s.files = [".bnsignore", "Gemfile", "Gemfile.lock", "History.txt", "README.rdoc", "Rakefile", "TAGS", "announcement.txt", "bin/org-ruby", "lib/org-ruby.rb", "lib/org-ruby/headline.rb", "lib/org-ruby/html_output_buffer.rb", "lib/org-ruby/html_symbol_replace.rb", "lib/org-ruby/line.rb", "lib/org-ruby/output_buffer.rb", "lib/org-ruby/parser.rb", "lib/org-ruby/regexp_helper.rb", "lib/org-ruby/textile_output_buffer.rb", "lib/org-ruby/textile_symbol_replace.rb", "lib/org-ruby/tilt.rb", "org-ruby.gemspec", "spec/data/freeform-example.org", "spec/data/freeform.org", "spec/data/hyp-planning.org", "spec/data/remember.org", "spec/headline_spec.rb", "spec/html_examples/advanced-code.html", "spec/html_examples/advanced-code.org", "spec/html_examples/advanced-lists.html", "spec/html_examples/advanced-lists.org", "spec/html_examples/block_code.html", "spec/html_examples/block_code.org", "spec/html_examples/blockcomment.html", "spec/html_examples/blockcomment.org", "spec/html_examples/blockquote.html", "spec/html_examples/blockquote.org", "spec/html_examples/center.html", "spec/html_examples/center.org", "spec/html_examples/code-comment.html", "spec/html_examples/code-comment.org", "spec/html_examples/comment-trees.html", "spec/html_examples/comment-trees.org", "spec/html_examples/custom-seq-todo.html", "spec/html_examples/custom-seq-todo.org", "spec/html_examples/custom-todo.html", "spec/html_examples/custom-todo.org", "spec/html_examples/custom-typ-todo.html", "spec/html_examples/custom-typ-todo.org", "spec/html_examples/deflist.html", "spec/html_examples/deflist.org", "spec/html_examples/entities.html", "spec/html_examples/entities.org", "spec/html_examples/escape-pre.html", "spec/html_examples/escape-pre.org", "spec/html_examples/export-exclude-only.html", "spec/html_examples/export-exclude-only.org", "spec/html_examples/export-keywords.html", "spec/html_examples/export-keywords.org", "spec/html_examples/export-tags.html", "spec/html_examples/export-tags.org", "spec/html_examples/export-title.html", "spec/html_examples/export-title.org", "spec/html_examples/footnotes.html", "spec/html_examples/footnotes.org", "spec/html_examples/horizontal_rule.html", "spec/html_examples/horizontal_rule.org", "spec/html_examples/html-literal.html", "spec/html_examples/html-literal.org", "spec/html_examples/inline-formatting.html", "spec/html_examples/inline-formatting.org", "spec/html_examples/inline-images.html", "spec/html_examples/inline-images.org", "spec/html_examples/link-features.html", "spec/html_examples/link-features.org", "spec/html_examples/lists.html", "spec/html_examples/lists.org", "spec/html_examples/metadata-comment.html", "spec/html_examples/metadata-comment.org", "spec/html_examples/only-list.html", "spec/html_examples/only-list.org", "spec/html_examples/only-table.html", "spec/html_examples/only-table.org", "spec/html_examples/skip-header.html", "spec/html_examples/skip-header.org", "spec/html_examples/skip-table.html", "spec/html_examples/skip-table.org", "spec/html_examples/subsupscript-nil.html", "spec/html_examples/subsupscript-nil.org", "spec/html_examples/subsupscript.html", "spec/html_examples/subsupscript.org", "spec/html_examples/tables.html", "spec/html_examples/tables.org", "spec/html_examples/text.html", "spec/html_examples/text.org", "spec/line_spec.rb", "spec/output_buffer_spec.rb", "spec/parser_spec.rb", "spec/regexp_helper_spec.rb", "spec/spec_helper.rb", "spec/textile_examples/block_code.org", "spec/textile_examples/block_code.textile", "spec/textile_examples/blockquote.org", "spec/textile_examples/blockquote.textile", "spec/textile_examples/center.org", "spec/textile_examples/center.textile", "spec/textile_examples/footnotes.org", "spec/textile_examples/footnotes.textile", "spec/textile_examples/keywords.org", "spec/textile_examples/keywords.textile", "spec/textile_examples/links.org", "spec/textile_examples/links.textile", "spec/textile_examples/lists.org", "spec/textile_examples/lists.textile", "spec/textile_examples/single-space-plain-list.org", "spec/textile_examples/single-space-plain-list.textile", "spec/textile_examples/tables.org", "spec/textile_examples/tables.textile", "spec/textile_output_buffer_spec.rb", "tasks/test_case.rake", "test/test_orgmode_parser.rb", "util/gen-special-replace.el"]
14
+ s.files = [".bnsignore", ".gitignore", "Gemfile", "Gemfile.lock", "History.txt", "README.rdoc", "Rakefile", "TAGS", "announcement.txt", "bin/org-ruby", "lib/org-ruby.rb", "lib/org-ruby/headline.rb", "lib/org-ruby/html_output_buffer.rb", "lib/org-ruby/html_symbol_replace.rb", "lib/org-ruby/line.rb", "lib/org-ruby/output_buffer.rb", "lib/org-ruby/parser.rb", "lib/org-ruby/regexp_helper.rb", "lib/org-ruby/textile_output_buffer.rb", "lib/org-ruby/textile_symbol_replace.rb", "lib/org-ruby/tilt.rb", "org-ruby.gemspec", "spec/data/freeform-example.org", "spec/data/freeform.org", "spec/data/hyp-planning.org", "spec/data/remember.org", "spec/headline_spec.rb", "spec/html_examples/advanced-code.html", "spec/html_examples/advanced-code.org", "spec/html_examples/advanced-lists.html", "spec/html_examples/advanced-lists.org", "spec/html_examples/block_code.html", "spec/html_examples/block_code.org", "spec/html_examples/blockcomment.html", "spec/html_examples/blockcomment.org", "spec/html_examples/blockquote.html", "spec/html_examples/blockquote.org", "spec/html_examples/center.html", "spec/html_examples/center.org", "spec/html_examples/code-comment.html", "spec/html_examples/code-comment.org", "spec/html_examples/comment-trees.html", "spec/html_examples/comment-trees.org", "spec/html_examples/custom-seq-todo.html", "spec/html_examples/custom-seq-todo.org", "spec/html_examples/custom-todo.html", "spec/html_examples/custom-todo.org", "spec/html_examples/custom-typ-todo.html", "spec/html_examples/custom-typ-todo.org", "spec/html_examples/deflist.html", "spec/html_examples/deflist.org", "spec/html_examples/entities.html", "spec/html_examples/entities.org", "spec/html_examples/escape-pre.html", "spec/html_examples/escape-pre.org", "spec/html_examples/export-exclude-only.html", "spec/html_examples/export-exclude-only.org", "spec/html_examples/export-keywords.html", "spec/html_examples/export-keywords.org", "spec/html_examples/export-tags.html", "spec/html_examples/export-tags.org", "spec/html_examples/export-title.html", "spec/html_examples/export-title.org", "spec/html_examples/footnotes.html", "spec/html_examples/footnotes.org", "spec/html_examples/horizontal_rule.html", "spec/html_examples/horizontal_rule.org", "spec/html_examples/html-literal.html", "spec/html_examples/html-literal.org", "spec/html_examples/inline-formatting.html", "spec/html_examples/inline-formatting.org", "spec/html_examples/inline-images.html", "spec/html_examples/inline-images.org", "spec/html_examples/link-features.html", "spec/html_examples/link-features.org", "spec/html_examples/lists.html", "spec/html_examples/lists.org", "spec/html_examples/metadata-comment.html", "spec/html_examples/metadata-comment.org", "spec/html_examples/only-list.html", "spec/html_examples/only-list.org", "spec/html_examples/only-table.html", "spec/html_examples/only-table.org", "spec/html_examples/skip-header.html", "spec/html_examples/skip-header.org", "spec/html_examples/skip-table.html", "spec/html_examples/skip-table.org", "spec/html_examples/subsupscript-nil.html", "spec/html_examples/subsupscript-nil.org", "spec/html_examples/subsupscript.html", "spec/html_examples/subsupscript.org", "spec/html_examples/tables.html", "spec/html_examples/tables.org", "spec/html_examples/text.html", "spec/html_examples/text.org", "spec/line_spec.rb", "spec/output_buffer_spec.rb", "spec/parser_spec.rb", "spec/regexp_helper_spec.rb", "spec/spec_helper.rb", "spec/textile_examples/block_code.org", "spec/textile_examples/block_code.textile", "spec/textile_examples/blockquote.org", "spec/textile_examples/blockquote.textile", "spec/textile_examples/center.org", "spec/textile_examples/center.textile", "spec/textile_examples/footnotes.org", "spec/textile_examples/footnotes.textile", "spec/textile_examples/keywords.org", "spec/textile_examples/keywords.textile", "spec/textile_examples/links.org", "spec/textile_examples/links.textile", "spec/textile_examples/lists.org", "spec/textile_examples/lists.textile", "spec/textile_examples/single-space-plain-list.org", "spec/textile_examples/single-space-plain-list.textile", "spec/textile_examples/tables.org", "spec/textile_examples/tables.textile", "spec/textile_output_buffer_spec.rb", "tasks/test_case.rake", "test/test_orgmode_parser.rb", "util/gen-special-replace.el"]
15
15
  s.homepage = "http://github.com/bdewey/org-ruby"
16
16
  s.rdoc_options = ["--main", "README.rdoc"]
17
17
  s.require_paths = ["lib"]
@@ -6,3 +6,15 @@
6
6
  <h1>Search links</h1>
7
7
  <p>This is a search link into code-comment.org.</p>
8
8
  <p><a href="code-comment.html">Code Comment</a></p>
9
+ <h1>Correct handling of .org URIs in HTML markup routine (thanks @rayl!)</h1>
10
+ <ul>
11
+ <li><a href="http://foo.com">foo.com website</a></li>
12
+ <li><a href="http://foo.org">foo.org website</a></li>
13
+ </ul>
14
+ <h1>In these links, .org is converted to .html</h1>
15
+ <ul>
16
+ <li><a href="http://foo.org/foo.html">foo.org/foo.org</a></li>
17
+ <li><a href="http://localhost:4567/foo.html">localhost:4567/foo.org</a></li>
18
+ <li><a href="path.html">file:path.org label</a></li>
19
+ <li><a href="notes/path.html">file:notes/path.org label</a></li>
20
+ </ul>
@@ -17,3 +17,19 @@ sections within documents, etc.
17
17
  This is a search link into code-comment.org.
18
18
 
19
19
  [[file:code-comment.org::*Code%20Comment][Code Comment]]
20
+
21
+ * Correct handling of .org URIs in HTML markup routine (thanks @rayl!)
22
+
23
+ - [[http://foo.com][foo.com website]]
24
+
25
+ - [[http://foo.org][foo.org website]]
26
+
27
+ * In these links, .org is converted to .html
28
+
29
+ - [[http://foo.org/foo.org][foo.org/foo.org]]
30
+
31
+ - [[http://localhost:4567/foo.org][localhost:4567/foo.org]]
32
+
33
+ - [[file:path.org][file:path.org label]]
34
+
35
+ - [[file:notes/path.org][file:notes/path.org label]]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: org-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-14 00:00:00.000000000Z
12
+ date: 2012-05-22 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubypants
16
- requirement: &70290787144340 !ruby/object:Gem::Requirement
16
+ requirement: &70208184207000 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 0.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70290787144340
24
+ version_requirements: *70208184207000
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bones
27
- requirement: &70290787142880 !ruby/object:Gem::Requirement
27
+ requirement: &70208184206440 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 3.8.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70290787142880
35
+ version_requirements: *70208184206440
36
36
  description: ! 'This gem contains Ruby routines for parsing org-mode files.The most
37
37
 
38
38
  significant thing this library does today is convert org-mode files to