octopress-codefence 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/octopress-codefence.rb +18 -12
- data/lib/octopress-codefence/version.rb +1 -1
- data/octopress-codefence.gemspec +2 -1
- metadata +32 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d176b1039ba0554aa4c339d32e93497095c1485
|
4
|
+
data.tar.gz: 61eb87caa9ef502a7953d28021247f5b6a3b216f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb69a7f8697aa2760c6417e20c54c5c9a884072960a16d83b796262263ef32fa414646b53fa3c0770017028b7a9f05045859df136b484f200a9c05fdd5df5115
|
7
|
+
data.tar.gz: 876b36050c39bb7f14a3f9fbc0f16f2366fa8544dd966d9599da451645cec184a3d19957a1103a94cc1212ad8674d8a0635ab24fb7019d87731e2bc0d0d68740
|
data/CHANGELOG.md
CHANGED
data/lib/octopress-codefence.rb
CHANGED
@@ -1,24 +1,30 @@
|
|
1
1
|
require 'octopress-codefence/version'
|
2
2
|
require 'octopress-code-highlighter'
|
3
|
-
require 'octopress-hooks'
|
4
3
|
|
5
4
|
module Octopress
|
6
5
|
module Codefence
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
if defined?(Jekyll::Hooks)
|
7
|
+
Jekyll::Hooks.register [:post, :page, :document], :pre_render do |item, payload|
|
8
|
+
item.content = Codefence::Highlighter.new(item.content, item.ext, item.site.config['code_aliases']).render
|
9
|
+
end
|
10
|
+
else
|
11
|
+
require 'octopress-hooks'
|
12
|
+
class PageHook < Hooks::Page
|
13
|
+
def pre_render(page)
|
14
|
+
page.content = Codefence::Highlighter.new(page.content, page.ext, page.site.config['code_aliases']).render
|
15
|
+
end
|
10
16
|
end
|
11
|
-
end
|
12
17
|
|
13
|
-
|
14
|
-
|
15
|
-
|
18
|
+
class PostHook < Hooks::Post
|
19
|
+
def pre_render(post)
|
20
|
+
post.content = Codefence::Highlighter.new(post.content, post.ext, post.site.config['code_aliases']).render
|
21
|
+
end
|
16
22
|
end
|
17
|
-
end
|
18
23
|
|
19
|
-
|
20
|
-
|
21
|
-
|
24
|
+
class DocumentHook < Hooks::Document
|
25
|
+
def pre_render(document)
|
26
|
+
document.content = Codefence::Highlighter.new(document.content).render
|
27
|
+
end
|
22
28
|
end
|
23
29
|
end
|
24
30
|
|
data/octopress-codefence.gemspec
CHANGED
@@ -8,7 +8,6 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = Octopress::Codefence::VERSION
|
9
9
|
gem.authors = ["Brandon Mathis"]
|
10
10
|
gem.email = ["brandon@imathis.com"]
|
11
|
-
gem.description = %q{Generate beautiful code snippets with advanced features on any Jekyll site.}
|
12
11
|
gem.summary = %q{Generate beautiful code snippets with advanced features on any Jekyll site.}
|
13
12
|
gem.homepage = "https://github.com/octopress/codefence"
|
14
13
|
gem.license = "MIT"
|
@@ -20,6 +19,8 @@ Gem::Specification.new do |gem|
|
|
20
19
|
gem.add_development_dependency 'jekyll'
|
21
20
|
gem.add_development_dependency 'clash'
|
22
21
|
gem.add_development_dependency 'rake'
|
22
|
+
gem.add_development_dependency 'rouge'
|
23
|
+
gem.add_development_dependency 'octopress-solarized'
|
23
24
|
|
24
25
|
gem.files = `git ls-files`.split($/).reject {|f| f =~ /^test\// }
|
25
26
|
gem.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-codefence
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octopress-code-highlighter
|
@@ -94,8 +94,35 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
-
|
98
|
-
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rouge
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: octopress-solarized
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description:
|
99
126
|
email:
|
100
127
|
- brandon@imathis.com
|
101
128
|
executables: []
|
@@ -132,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
132
159
|
version: '0'
|
133
160
|
requirements: []
|
134
161
|
rubyforge_project:
|
135
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.4.6
|
136
163
|
signing_key:
|
137
164
|
specification_version: 4
|
138
165
|
summary: Generate beautiful code snippets with advanced features on any Jekyll site.
|