org-ruby 0.9.1.gh → 0.9.1

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.
@@ -24,7 +24,7 @@ require 'org-ruby/tilt'
24
24
  module OrgRuby
25
25
 
26
26
  # :stopdoc:
27
- VERSION = '0.9.1.gh'
27
+ VERSION = '0.9.1'
28
28
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
29
29
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
30
30
  # :startdoc:
@@ -1,3 +1,14 @@
1
+ begin
2
+ require 'pygments'
3
+ rescue LoadError
4
+ # Pygments is not supported so we try instead with CodeRay
5
+ begin
6
+ require 'coderay'
7
+ rescue LoadError
8
+ # No code syntax highlighting
9
+ end
10
+ end
11
+
1
12
  module Orgmode
2
13
 
3
14
  class HtmlOutputBuffer < OutputBuffer
@@ -40,19 +51,6 @@ module Orgmode
40
51
  @footnotes = {}
41
52
  @unclosed_tags = []
42
53
  @logger.debug "HTML export options: #{@options.inspect}"
43
-
44
- unless @options[:skip_syntax_highlight]
45
- begin
46
- require 'pygments'
47
- rescue LoadError
48
- # Pygments is not supported so we try instead with CodeRay
49
- begin
50
- require 'coderay'
51
- rescue LoadError
52
- # No code syntax highlighting
53
- end
54
- end
55
- end
56
54
  end
57
55
 
58
56
  # Output buffer is entering a new mode. Use this opportunity to
@@ -63,7 +61,7 @@ module Orgmode
63
61
 
64
62
  if HtmlBlockTag[mode]
65
63
  unless ((mode_is_table?(mode) and skip_tables?) or
66
- (mode == :src and !@options[:skip_syntax_highlight] and defined? Pygments))
64
+ (mode == :src and defined? Pygments))
67
65
  css_class = case
68
66
  when (mode == :src and @block_lang.empty?)
69
67
  " class=\"src\""
@@ -94,7 +92,7 @@ module Orgmode
94
92
  m = super(mode)
95
93
  if HtmlBlockTag[m]
96
94
  unless ((mode_is_table?(m) and skip_tables?) or
97
- (m == :src and !@options[:skip_syntax_highlight] and defined? Pygments))
95
+ (m == :src and defined? Pygments))
98
96
  add_paragraph if @new_paragraph
99
97
  @new_paragraph = true
100
98
  @logger.debug "</#{HtmlBlockTag[m]}>"
@@ -113,8 +111,6 @@ module Orgmode
113
111
  # NOTE: CodeRay and Pygments already escape the html once, so
114
112
  # no need to escapeHTML
115
113
  case
116
- when (current_mode == :src and @options[:skip_syntax_highlight])
117
- @buffer = escapeHTML @buffer
118
114
  when (current_mode == :src and defined? Pygments)
119
115
  lang = normalize_lang @block_lang
120
116
  @output << "\n" unless @new_paragraph == :start
@@ -303,11 +303,10 @@ module Orgmode
303
303
  export_options = {
304
304
  :decorate_title => @in_buffer_settings["TITLE"],
305
305
  :export_heading_number => export_heading_number?,
306
- :export_todo => export_todo?,
307
- :use_sub_superscripts => use_sub_superscripts?,
308
- :export_footnotes => export_footnotes?,
309
- :link_abbrevs => @link_abbrevs,
310
- :skip_syntax_highlight => @parser_options[:skip_syntax_highlight]
306
+ :export_todo => export_todo?,
307
+ :use_sub_superscripts => use_sub_superscripts?,
308
+ :export_footnotes => export_footnotes?,
309
+ :link_abbrevs => @link_abbrevs
311
310
  }
312
311
  export_options[:skip_tables] = true if not export_tables?
313
312
  output = ""
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: org-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1.gh
5
- prerelease: 6
4
+ version: 0.9.1
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Brian Dewey
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-10 00:00:00.000000000 Z
12
+ date: 2014-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubypants
16
- requirement: &70363196176300 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: 0.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70363196176300
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.2.0
25
30
  description: ! 'An org-mode parser written in Ruby. This gem contains Ruby routines
26
31
  for parsing org-mode files.The most
27
32
 
@@ -79,9 +84,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
84
  version: '0'
80
85
  requirements: []
81
86
  rubyforge_project: org-ruby
82
- rubygems_version: 1.8.10
87
+ rubygems_version: 1.8.24
83
88
  signing_key:
84
89
  specification_version: 3
85
90
  summary: This gem contains Ruby routines for parsing org-mode files.
86
91
  test_files: []
87
- has_rdoc: