polytexnic 0.6.10 → 0.6.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f0ad276c57218415420b8cba1f38f959755f558
4
- data.tar.gz: 9be64711b70eaca8cf6ace8c447a9338fd6a7c9d
3
+ metadata.gz: 57bbac0600d61db44cc14762bacc2a24594ab2c9
4
+ data.tar.gz: fa73a4ee9071da8a1cd15c8bdc8224fd40368cee
5
5
  SHA512:
6
- metadata.gz: addd557f217ec6d6b4f6885b0cb6b990c38bcc2d24712a76a5949057f9f56f22f91c20736cf1bf35b0079c4bb998f1c9457f7962ca12b75ad51ce5cb987fd930
7
- data.tar.gz: 971630b7710fe64ead04a5fc4ccf3fd8729fb1cfd3bdeab18135c802c3e47db4f843c78179bd0d4a4e3dd8aa429c1987abee96944e10312cb7a4dd15cc517dfe
6
+ metadata.gz: 1e8b902671181b3e01162ee6aa1a6f8882e1b72d02364c33854b97922803771d1e23d0e9137adc3f5a743fa8c9694601afa916ba20a5d673d0c7b3a839ba8960
7
+ data.tar.gz: 1e7f38cb586cce81529f9d3b29a5c732ad3176afa4bda9a56b834a0abcafc463e966173c0391de26cd31a69f70d87d9bc490357bab03d47091784e34de3ef69f
@@ -87,8 +87,7 @@ module Polytexnic
87
87
  if File.exist?(filename)
88
88
  language = $3 || $2 || 'text'
89
89
  highlight_options = $4
90
- code = ["%= lang:#{language}"]
91
- code << highlight_options unless highlight_options.nil?
90
+ code = ["%= lang:#{language}#{highlight_options}"]
92
91
  code << '\begin{code}'
93
92
  code.concat(File.read($1).split("\n"))
94
93
  code << '\end{code}'
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "0.6.10"
2
+ VERSION = "0.6.11"
3
3
  end
@@ -118,6 +118,7 @@ describe Polytexnic::Pipeline do
118
118
  end
119
119
 
120
120
  describe "code inclusion" do
121
+
121
122
  context "for an existing file" do
122
123
 
123
124
  context "with no extension" do
@@ -149,7 +150,7 @@ describe Polytexnic::Pipeline do
149
150
 
150
151
  context "with a custom language override" do
151
152
  let(:polytex) do <<-'EOS'
152
- %= << (polytexnic_commands.sty, lang: tex)
153
+ %= <<(polytexnic_commands.sty, lang: tex)
153
154
  EOS
154
155
  end
155
156
  let(:output) do <<-'EOS'
@@ -159,6 +160,18 @@ describe Polytexnic::Pipeline do
159
160
  it { should resemble output }
160
161
  it { should_not include '<p></p>' }
161
162
  end
163
+
164
+ context "with custom options" do
165
+ let(:polytex) do <<-'EOS'
166
+ %= <<(polytexnic_commands.sty, lang: tex, options: "hl_lines": [5])
167
+ EOS
168
+ end
169
+ let(:output) do <<-'EOS'
170
+ <span class="hll">
171
+ EOS
172
+ end
173
+ it { should resemble output }
174
+ end
162
175
  end
163
176
 
164
177
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytexnic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.10
4
+ version: 0.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl