octopress-codefence 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56f65a05571d2186ca1557c12d24f0f5869f9740
4
- data.tar.gz: 118ed72ad0e05b0bf7cc7a5c9eeb85d4c4e8ac7b
3
+ metadata.gz: 545e619f27984c54373639fcb22e34456e405680
4
+ data.tar.gz: 9e36dd499d95b870c29a5ae44a548fb3f7d8d25e
5
5
  SHA512:
6
- metadata.gz: a2bb05dc4dcbbc40371ba4c5b8e812ecd57b3144c38c53b49fd5f0e2a1d75c753ff2d3803a66611c9f0e886941ab0bcda85ae8de950c8513c4ba120228e28b6e
7
- data.tar.gz: f643aa6bf1af9d639fba1c4e721bc4e0f5201e19379735cdd9834be3f73ccb03fdb02aa970c6bdd09362bf43c282da40e06d5b4ba28472c91c90dbeb76f3015b
6
+ metadata.gz: 09f4855f3271d891b8b0330b6293306e6017998c91e0b8bf58252f3ad5dc9af18aad277ec95cb03be69faeb570265702332d750c13e69ceba44f5cf5eb01f8a5
7
+ data.tar.gz: b2a3477215b68087ee9194c40aecaf8f1761122043b323edaf4edd09bd41000d8b4c8a49fc76bfb82f7ddefa9082d650cde8841257cd98c2de94727cfa59725c
data/CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0
4
+ - Switched to the new octopress-code-highlighter gem.
5
+
3
6
  ## 1.3.2
4
- - Removed test files from gem pkg
7
+ - Removed test files from gem pkg.
5
8
 
6
9
  ## 1.3.1
7
10
  - Changed repo homepage url in gemspec.
@@ -16,7 +19,7 @@
16
19
  - Updated Octopress pygments, adding default Liquid escape.
17
20
 
18
21
  ## 1.1.0
19
- - Added support for language aliases in Jekyll config
22
+ - Added support for language aliases in Jekyll config.
20
23
 
21
24
  ## 1.0.0
22
25
  - Initial release
@@ -1,5 +1,5 @@
1
1
  module Octopress
2
2
  class Codefence
3
- VERSION = "1.3.2"
3
+ VERSION = "1.4.0"
4
4
  end
5
5
  end
@@ -1,11 +1,11 @@
1
1
  require 'octopress-codefence/version'
2
- require 'octopress-pygments'
2
+ require 'octopress-code-highlighter'
3
3
  require 'jekyll-page-hooks'
4
4
 
5
5
  module Jekyll
6
6
  class Codefence < PageHooks
7
7
  def pre_render(page)
8
- page.content = Octopress::Codefence.new(page.content, page.ext, page.site.config['pygments_aliases']).render
8
+ page.content = Octopress::Codefence.new(page.content, page.ext, page.site.config['code_aliases']).render
9
9
  end
10
10
  end
11
11
  end
@@ -30,9 +30,9 @@ module Octopress
30
30
  code = $2.to_s
31
31
  begin
32
32
  get_code(code, get_options(markup))
33
- rescue MentosError => e
33
+ rescue => e
34
34
  markup = "```#{markup}"
35
- Pygments.highlight_failed(e, "```[language] [title] [url] [link text] [linenos:false] [start:#] [mark:#,#-#]\ncode\n```", markup, code)
35
+ CodeHighlighter.highlight_failed(e, "```[language] [title] [url] [link text] [linenos:false] [start:#] [mark:#,#-#]\ncode\n```", markup, code)
36
36
  end
37
37
  end
38
38
  end
@@ -40,7 +40,7 @@ module Octopress
40
40
 
41
41
  def get_options(markup)
42
42
  defaults = { escape: true }
43
- clean_markup = Pygments.clean_markup(markup)
43
+ clean_markup = CodeHighlighter.clean_markup(markup)
44
44
 
45
45
  if clean_markup =~ AllOptions
46
46
  defaults = {
@@ -55,13 +55,13 @@ module Octopress
55
55
  title: $2
56
56
  }
57
57
  end
58
- Pygments.parse_markup(markup, defaults)
58
+ CodeHighlighter.parse_markup(markup, defaults)
59
59
  end
60
60
 
61
61
 
62
62
  def get_code(code, options)
63
63
  options[:aliases] = @aliases || {}
64
- code = Pygments.highlight(code, options)
64
+ code = CodeHighlighter.highlight(code, options)
65
65
  code = "<notextile>#{code}</notextile>" if !@ext.nil? and @ext.match(/textile/)
66
66
  code
67
67
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
13
13
  gem.homepage = "https://github.com/octopress/codefence"
14
14
  gem.license = "MIT"
15
15
 
16
- gem.add_runtime_dependency 'octopress-pygments', '>= 2.0.0'
16
+ gem.add_runtime_dependency 'octopress-code-highlighter', '~> 3.0.1'
17
17
  gem.add_runtime_dependency 'jekyll-page-hooks', '>= 1.0.2'
18
18
 
19
19
  gem.files = `git ls-files`.split($/).reject {|f| f =~ /^test\// }
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress-codefence
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-19 00:00:00.000000000 Z
11
+ date: 2014-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: octopress-pygments
14
+ name: octopress-code-highlighter
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
19
+ version: 3.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.0
26
+ version: 3.0.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jekyll-page-hooks
29
29
  requirement: !ruby/object:Gem::Requirement