octopress-code-highlighter 4.0.3 → 4.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b873308424a70aaeff4e38929c2d30b3ad997c5
|
4
|
+
data.tar.gz: 04c339c9d22b19071a6d188da480d0242329b9ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9277a808f9fea0e4090c39b7a600698fd5b14ce61e609eb15616d9ef4987887a47afef4cf1533a55a344aaf2a027fd4e1da6d00fc555d7eab6213663b62f091
|
7
|
+
data.tar.gz: e06b537a0ab19e4a951ba958712c515567cab02934614607ccbe0b09443a0c63f1f8d3f8db7a413a3e0d43410c8851cc7550a5d93e98ce5c4465584008e19782
|
data/CHANGELOG.md
CHANGED
@@ -18,6 +18,7 @@ module Octopress
|
|
18
18
|
.sub(/\s*end:\s*\d+/i,'')
|
19
19
|
.sub(/\s*range:\s*\d+-\d+/i,'')
|
20
20
|
.sub(/\s*escape:\s*\w+/i,'')
|
21
|
+
.sub(/\s*startinline:\s*\w+/i,'')
|
21
22
|
end
|
22
23
|
|
23
24
|
def parse_markup(defaults = {})
|
@@ -30,7 +31,8 @@ module Octopress
|
|
30
31
|
link_text: link_text,
|
31
32
|
start: start,
|
32
33
|
end: endline,
|
33
|
-
escape: escape
|
34
|
+
escape: escape,
|
35
|
+
startinline: startinline
|
34
36
|
}
|
35
37
|
options = options.delete_if { |k,v| v.nil? }
|
36
38
|
defaults.merge(options)
|
@@ -40,6 +42,10 @@ module Octopress
|
|
40
42
|
extract(/\s*lang:\s*(\S+)/i)
|
41
43
|
end
|
42
44
|
|
45
|
+
def startinline
|
46
|
+
boolize(extract(/\s*startinline:\s*(\w+)/i))
|
47
|
+
end
|
48
|
+
|
43
49
|
def url
|
44
50
|
extract(/\s*url:\s*(("(.+?)")|('(.+?)')|(\S+))/i, [3, 5, 6])
|
45
51
|
end
|
@@ -80,11 +80,13 @@ module Octopress
|
|
80
80
|
def render_pygments
|
81
81
|
if lexer = Pygments::Lexer.find(lang) || Pygments::Lexer.find(@aliases[lang])
|
82
82
|
begin
|
83
|
+
options = { encoding: 'utf-8' }
|
84
|
+
if lang =~ /php/
|
85
|
+
options[:startinline] = @options[:startinline] || true
|
86
|
+
end
|
83
87
|
lexer.highlight @code, {
|
84
88
|
formatter: 'html',
|
85
|
-
options:
|
86
|
-
encoding: 'utf-8'
|
87
|
-
}
|
89
|
+
options: options
|
88
90
|
}
|
89
91
|
rescue MentosError => e
|
90
92
|
raise e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopress-code-highlighter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0
|
4
|
+
version: 4.1.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-06-
|
11
|
+
date: 2014-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorator
|