jekyll-terminal 0.1.3 → 0.1.4

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-terminal.rb +7 -3
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21bae7f9c4bc937c64ee30e941f7b03762c84ae4
4
- data.tar.gz: a35e2cc065e017069555088c4819852811697f1b
3
+ metadata.gz: fbe97a0d07757bdb2e786ae0217a6c78c710bd61
4
+ data.tar.gz: 28728c1185978350c0eb4c90696d26a32cd949d7
5
5
  SHA512:
6
- metadata.gz: 8574a272ffcaa99e5f4b312df3fa6c436823e2d06ed81fd38cdf20bbca4f8b61c37560bf2663a5c4a587cb031fa478d2ab46423a458d12d48f5e209042147689
7
- data.tar.gz: e6f668a069fc0ffa256c335b6aa15ea1a3a4c892c43df88a854d8d01103295ac358afc694b8709b30e6ec9d3970d2d1c92d96c16ff0cf826de373be029898926
6
+ metadata.gz: 2a7d1a84b405650fd6b26a885c49aadb6f583fea650dc104b0a871943125e791d703d69b0814144304bf6ce6ae61a5be948111ee2f7077896fbc698e14654e5a
7
+ data.tar.gz: 2b08f7c8f9e20d34a8265e9bbce9bd45640fdce04138dad43f0be7c6b7da4b5023a09c53bc60e0924ebde808a30e8a36b9df226e714586d8dac56a426552eaa2
@@ -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
- if line.start_with?("$")
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.3
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: 2016-05-11 00:00:00.000000000 Z
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.0.14.1
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