jekyll-terminal 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll-terminal.rb +7 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbe97a0d07757bdb2e786ae0217a6c78c710bd61
|
4
|
+
data.tar.gz: 28728c1185978350c0eb4c90696d26a32cd949d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a7d1a84b405650fd6b26a885c49aadb6f583fea650dc104b0a871943125e791d703d69b0814144304bf6ce6ae61a5be948111ee2f7077896fbc698e14654e5a
|
7
|
+
data.tar.gz: 2b08f7c8f9e20d34a8265e9bbce9bd45640fdce04138dad43f0be7c6b7da4b5023a09c53bc60e0924ebde808a30e8a36b9df226e714586d8dac56a426552eaa2
|
data/lib/jekyll-terminal.rb
CHANGED
@@ -60,11 +60,15 @@ module Jekyll
|
|
60
60
|
site = context.registers[:site]
|
61
61
|
terminal_config = site.config[:terminal] || {}
|
62
62
|
tag_name = terminal_config[:tag_name] || 'h3'
|
63
|
+
continuation_string = terminal_config[:continuation_string] || '/'
|
64
|
+
continuation_string = '/' if continuation_string == '$'
|
63
65
|
content = super(context).strip.lines.map do |line|
|
64
|
-
|
66
|
+
# Test the continuation string first, because it may start with '$'.
|
67
|
+
# Note that it can't be '$' thanks to the guard above.
|
68
|
+
if line.start_with?(continuation_string)
|
69
|
+
"<span class='continuation'>#{esc line[continuation_string.size..-1]}</span>"
|
70
|
+
elsif line.start_with?("$")
|
65
71
|
"<span class='command'>#{esc line[1..-1]}</span>"
|
66
|
-
elsif line.start_with?("/")
|
67
|
-
"<span class='continuation'>#{esc line[1..-1]}</span>"
|
68
72
|
else
|
69
73
|
"<span class='output'>#{esc line}</span>"
|
70
74
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-terminal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xavier Décoret
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
61
61
|
version: '0'
|
62
62
|
requirements: []
|
63
63
|
rubyforge_project:
|
64
|
-
rubygems_version: 2.
|
64
|
+
rubygems_version: 2.5.2
|
65
65
|
signing_key:
|
66
66
|
specification_version: 4
|
67
67
|
summary: Render shell-commands nicely in a Jekyll
|