polytexnic 1.5.6 → 1.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polytexnic/postprocessors/html.rb +4 -1
- data/lib/polytexnic/version.rb +1 -1
- data/spec/to_html/text_formatting_spec.rb +12 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 423d284da13a7492acee7fac2e273dbe9d25663362e97a54ae4ff5daa297a171
|
4
|
+
data.tar.gz: f52db09a79e8a3e0805b0094ebe95e47571b252b34ecb0de1d3c80b0275a94a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/polytexnic/version.rb
CHANGED
@@ -53,10 +53,19 @@ describe 'Polytexnic::Pipeline#to_html' do
|
|
53
53
|
end
|
54
54
|
|
55
55
|
describe "custom kode command" do
|
56
|
-
|
57
|
-
|
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.
|
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-
|
12
|
+
date: 2018-08-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|