polytexnic 1.5.6 → 1.5.7

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
  SHA256:
3
- metadata.gz: 99789fd7c8b5e8a0d27f6d8839f8dc16f7c2aa6d41a54e136f8069a8a923fe03
4
- data.tar.gz: ad8cbcda014fc85be26234b517a08833a4639007406cb6fc6379a8386b79691c
3
+ metadata.gz: 423d284da13a7492acee7fac2e273dbe9d25663362e97a54ae4ff5daa297a171
4
+ data.tar.gz: f52db09a79e8a3e0805b0094ebe95e47571b252b34ecb0de1d3c80b0275a94a6
5
5
  SHA512:
6
- metadata.gz: 320053b1c2846a5969b3eff2098576f65249dce9e6be2c35920938a231c6c77ba7036d9478971fb86b36b905276f4e4995a61eb85b3d7fda5eb8d445e08c8c82
7
- data.tar.gz: dfee4b00246686c5da4993c945462613866197cf7b36c32fb1b6050cdfaa097c884ec0d8569e6197c4a2baef82326547228d1991099643c7e68da54dc27a1fb8
6
+ metadata.gz: c965d97832722277b12405d12404b258c8d19a960b3732496114ba6748ccf2b890a67ec212bf9aa9cb984a70716af47324aa68933285bfad0384cac271d676a3
7
+ data.tar.gz: ba2aa4bebfb0d68ba0971b16c42528569fe30539aee9bb151acae7a02d87240c6a54d6eef40477ff61bab2657ed3dccad56cc40c09af0f49fabe952a68dede1d
@@ -30,7 +30,6 @@ module Polytexnic
30
30
  subsubsection(doc)
31
31
  headings(doc)
32
32
  sout(doc)
33
- kode(doc)
34
33
  coloredtext(doc)
35
34
  filepath(doc)
36
35
  backslash_break(doc)
@@ -38,6 +37,7 @@ module Polytexnic
38
37
  center(doc)
39
38
  title(doc)
40
39
  doc = smart_single_quotes(doc)
40
+ kode(doc)
41
41
  tex_logos(doc)
42
42
  restore_literal(doc)
43
43
  doc = restore_unicode(doc)
@@ -692,6 +692,9 @@ module Polytexnic
692
692
  def kode(doc)
693
693
  doc.xpath('//kode').each do |node|
694
694
  node.name = 'code'
695
+ # Undo "smart" quotes in kode.
696
+ node.content = node.content.gsub("‘", "'")
697
+ node.content = node.content.gsub("’", "'")
695
698
  end
696
699
  end
697
700
 
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.5.6"
2
+ VERSION = "1.5.7"
3
3
  end
@@ -53,10 +53,19 @@ describe 'Polytexnic::Pipeline#to_html' do
53
53
  end
54
54
 
55
55
  describe "custom kode command" do
56
- let(:polytex) { '\kode{function\_name}' }
57
- it { should resemble '<code>function_name</code>' }
56
+
57
+ context "with an underscore" do
58
+ let(:polytex) { '\kode{function\_name}' }
59
+ it { should resemble '<code>function_name</code>' }
60
+ end
61
+
62
+ context "with quotes" do
63
+ let(:polytex) { %(\\kode{'a'.."z"}) }
64
+ it { should include %(<code>'a'.."z"</code>) }
65
+ end
58
66
  end
59
67
 
68
+
60
69
  context "coloredtext" do
61
70
  describe "coloredtext command" do
62
71
  let(:polytex) { '\coloredtext{red}{text}' }
@@ -77,4 +86,4 @@ describe 'Polytexnic::Pipeline#to_html' do
77
86
  end
78
87
  end
79
88
  end
80
- end
89
+ end
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: 1.5.6
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-07-28 00:00:00.000000000 Z
12
+ date: 2018-08-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri