polytexnic 1.3.4 → 1.3.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 293fcbd01f96a6b9aff727e119a30ef79bad2587
|
4
|
+
data.tar.gz: 99566a9937c51b7f13a10a4665aa958eae03f708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bd94faa5106c6c6756d0946f047af81517c6541aa57adbaaca9e3152394b48de4d35a5fe8fcba3d340c6253083831875fe0a32f8535d5aaa5a024994c416555
|
7
|
+
data.tar.gz: 37df35e091bb4e355199644a819266d8dc06ffdf3b67369360726e44e68529ad1d81e0e353291f51327bc0e3815bb77a9d61e56ad1205502972c9e8a374a47b9
|
data/lib/polytexnic.rb
CHANGED
@@ -54,7 +54,9 @@ module Polytexnic
|
|
54
54
|
else
|
55
55
|
default_language_labels.merge(labels)
|
56
56
|
end
|
57
|
-
|
57
|
+
tempdir = 'tmp'
|
58
|
+
FileUtils.mkdir(tempdir) unless File.directory?(tempdir)
|
59
|
+
@highlight_cache_filename = File.join(tempdir, '.highlight_cache')
|
58
60
|
if File.exist?(@highlight_cache_filename)
|
59
61
|
content = File.read(@highlight_cache_filename)
|
60
62
|
.force_encoding('ASCII-8BIT')
|
@@ -31,6 +31,7 @@ module Polytexnic
|
|
31
31
|
headings(doc)
|
32
32
|
sout(doc)
|
33
33
|
kode(doc)
|
34
|
+
# return '2'
|
34
35
|
coloredtext(doc)
|
35
36
|
filepath(doc)
|
36
37
|
backslash_break(doc)
|
@@ -45,17 +46,20 @@ module Polytexnic
|
|
45
46
|
codelistings(doc)
|
46
47
|
asides(doc)
|
47
48
|
make_cross_references(doc)
|
49
|
+
# return '3'
|
48
50
|
hrefs(doc)
|
49
51
|
graphics_and_figures(doc)
|
50
52
|
images_and_imageboxes(doc)
|
51
53
|
tables(doc)
|
52
54
|
math(doc)
|
53
55
|
frontmatter(doc)
|
56
|
+
# return '4'
|
54
57
|
mainmatter(doc)
|
55
58
|
footnotes(doc)
|
56
59
|
table_of_contents(doc)
|
57
60
|
add_noindent(doc)
|
58
61
|
convert_to_html(doc)
|
62
|
+
# return '5'
|
59
63
|
end
|
60
64
|
|
61
65
|
private
|
data/lib/polytexnic/version.rb
CHANGED
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Polytexnic::Pipeline do
|
5
5
|
before(:all) do
|
6
|
-
FileUtils.rm('
|
6
|
+
FileUtils.rm('tmp/.highlight_cache') if File.exist?('tmp/.highlight_cache')
|
7
7
|
end
|
8
8
|
subject(:processed_text) { Polytexnic::Pipeline.new(polytex).to_html }
|
9
9
|
|
@@ -75,7 +75,7 @@ describe Polytexnic::Pipeline do
|
|
75
75
|
Polytexnic::Pipeline.new(polytex).to_html
|
76
76
|
end
|
77
77
|
it "should not crash" do
|
78
|
-
expect(File.exist?('
|
78
|
+
expect(File.exist?('tmp/.highlight_cache')).to be_truthy
|
79
79
|
expect { Polytexnic::Pipeline.new(polytex).to_html }.not_to raise_error
|
80
80
|
end
|
81
81
|
end
|