latexpdf 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/latexpdf/escaper.rb +3 -3
- data/lib/latexpdf/version.rb +1 -1
- data/test/dummy/log/test.log +72 -0
- data/test/latexpdf/escaper_test.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d6d29297110637882fd79b64247c0528ae89389
|
4
|
+
data.tar.gz: 6b927dbefa2faa4bdfb717d2f058daf3963798d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e50a2797e608e77228cf015ab65aa3c28c6f89e4dbe57ed47032cea202acd2fda238f4b8f55d65147ca078833863f8fda95fdeddbd7d74461ea41507f887b989
|
7
|
+
data.tar.gz: 01e13848b1e3819c285ea1ce5d7a251930021f8fa3015e01dedf1c3e621db44531852a096ca18e47890f8a502aed8520ed072dc3b14bc620d35ec8b533108758
|
data/lib/latexpdf/escaper.rb
CHANGED
@@ -10,8 +10,8 @@ module Latexpdf
|
|
10
10
|
'>' => 'greater'
|
11
11
|
}
|
12
12
|
|
13
|
-
def
|
14
|
-
text.gsub(
|
13
|
+
def tab_newline_to_space(text)
|
14
|
+
text.gsub(/[\x09\x0A]/, " ")
|
15
15
|
end
|
16
16
|
|
17
17
|
def remove_non_printable_chars(text)
|
@@ -27,7 +27,7 @@ module Latexpdf
|
|
27
27
|
"\\text#{ESC_MAP[m]}{}"
|
28
28
|
end
|
29
29
|
}
|
30
|
-
text =
|
30
|
+
text = tab_newline_to_space(text)
|
31
31
|
text = remove_non_printable_chars(text)
|
32
32
|
text.html_safe
|
33
33
|
end
|
data/lib/latexpdf/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -898,3 +898,75 @@ Completed 200 OK in 4291ms (Views: 4291.0ms)
|
|
898
898
|
-------------------------------------------------------------
|
899
899
|
ConfigTest: test_Build_path_is_Rails_temporary_dir_by_default
|
900
900
|
-------------------------------------------------------------
|
901
|
+
-------------------------------------------------------------
|
902
|
+
ConfigTest: test_Build_path_is_Rails_temporary_dir_by_default
|
903
|
+
-------------------------------------------------------------
|
904
|
+
-----------------------------------------------------------
|
905
|
+
RenderingTest: test_Generate_PDF_on_the_fly_in_a_controller
|
906
|
+
-----------------------------------------------------------
|
907
|
+
Started GET "/tex/example.pdf" for 127.0.0.1 at 2017-04-03 11:06:04 +0200
|
908
|
+
Processing by TexController#example as PDF
|
909
|
+
Rendered tex/example.pdf.tex (1740.8ms)
|
910
|
+
Completed 200 OK in 1751ms (Views: 1750.2ms)
|
911
|
+
---------------------------------------------------------
|
912
|
+
RenderingTest: test_Generate_PDF_using_escaped_characters
|
913
|
+
---------------------------------------------------------
|
914
|
+
Started GET "/tex/example2.pdf" for 127.0.0.1 at 2017-04-03 11:06:06 +0200
|
915
|
+
Processing by TexController#example2 as PDF
|
916
|
+
Rendered tex/example2.pdf.tex (1750.3ms)
|
917
|
+
Completed 200 OK in 1752ms (Views: 1752.2ms)
|
918
|
+
---------------------------------------------------------------
|
919
|
+
RenderingTest: test_Generate_PDF_using_non_printable_characters
|
920
|
+
---------------------------------------------------------------
|
921
|
+
Started GET "/tex/example3.pdf" for 127.0.0.1 at 2017-04-03 11:06:08 +0200
|
922
|
+
Processing by TexController#example3 as PDF
|
923
|
+
Rendered tex/example3.pdf.tex (1848.3ms)
|
924
|
+
Completed 200 OK in 1851ms (Views: 1851.1ms)
|
925
|
+
-------------------------------------------------------------
|
926
|
+
ConfigTest: test_Build_path_is_Rails_temporary_dir_by_default
|
927
|
+
-------------------------------------------------------------
|
928
|
+
-----------------------------------------------------------
|
929
|
+
RenderingTest: test_Generate_PDF_on_the_fly_in_a_controller
|
930
|
+
-----------------------------------------------------------
|
931
|
+
Started GET "/tex/example.pdf" for 127.0.0.1 at 2017-04-03 11:07:29 +0200
|
932
|
+
Processing by TexController#example as PDF
|
933
|
+
Rendered tex/example.pdf.tex (5929.2ms)
|
934
|
+
Completed 200 OK in 5946ms (Views: 5945.7ms)
|
935
|
+
---------------------------------------------------------
|
936
|
+
RenderingTest: test_Generate_PDF_using_escaped_characters
|
937
|
+
---------------------------------------------------------
|
938
|
+
Started GET "/tex/example2.pdf" for 127.0.0.1 at 2017-04-03 11:07:35 +0200
|
939
|
+
Processing by TexController#example2 as PDF
|
940
|
+
Rendered tex/example2.pdf.tex (6635.2ms)
|
941
|
+
Completed 200 OK in 6639ms (Views: 6638.4ms)
|
942
|
+
---------------------------------------------------------------
|
943
|
+
RenderingTest: test_Generate_PDF_using_non_printable_characters
|
944
|
+
---------------------------------------------------------------
|
945
|
+
Started GET "/tex/example3.pdf" for 127.0.0.1 at 2017-04-03 11:07:42 +0200
|
946
|
+
Processing by TexController#example3 as PDF
|
947
|
+
Rendered tex/example3.pdf.tex (6395.3ms)
|
948
|
+
Completed 200 OK in 6398ms (Views: 6397.3ms)
|
949
|
+
-------------------------------------------------------------
|
950
|
+
ConfigTest: test_Build_path_is_Rails_temporary_dir_by_default
|
951
|
+
-------------------------------------------------------------
|
952
|
+
-----------------------------------------------------------
|
953
|
+
RenderingTest: test_Generate_PDF_on_the_fly_in_a_controller
|
954
|
+
-----------------------------------------------------------
|
955
|
+
Started GET "/tex/example.pdf" for 127.0.0.1 at 2017-04-03 11:10:29 +0200
|
956
|
+
Processing by TexController#example as PDF
|
957
|
+
Rendered tex/example.pdf.tex (3328.1ms)
|
958
|
+
Completed 200 OK in 3338ms (Views: 3337.6ms)
|
959
|
+
---------------------------------------------------------
|
960
|
+
RenderingTest: test_Generate_PDF_using_escaped_characters
|
961
|
+
---------------------------------------------------------
|
962
|
+
Started GET "/tex/example2.pdf" for 127.0.0.1 at 2017-04-03 11:10:32 +0200
|
963
|
+
Processing by TexController#example2 as PDF
|
964
|
+
Rendered tex/example2.pdf.tex (3438.1ms)
|
965
|
+
Completed 200 OK in 3440ms (Views: 3440.0ms)
|
966
|
+
---------------------------------------------------------------
|
967
|
+
RenderingTest: test_Generate_PDF_using_non_printable_characters
|
968
|
+
---------------------------------------------------------------
|
969
|
+
Started GET "/tex/example3.pdf" for 127.0.0.1 at 2017-04-03 11:10:35 +0200
|
970
|
+
Processing by TexController#example3 as PDF
|
971
|
+
Rendered tex/example3.pdf.tex (3440.6ms)
|
972
|
+
Completed 200 OK in 3443ms (Views: 3442.5ms)
|
@@ -57,10 +57,10 @@ module Latexpdf
|
|
57
57
|
assert_equal " test ", Latexpdf.escape_latex("\t\ttest\t")
|
58
58
|
end
|
59
59
|
|
60
|
-
def
|
60
|
+
def test_replaces_newlines_to_space
|
61
61
|
text = "\ntest\n\n"
|
62
62
|
escaped = Latexpdf.escape_latex(text)
|
63
|
-
assert_equal
|
63
|
+
assert_equal " test ", escaped
|
64
64
|
end
|
65
65
|
|
66
66
|
def test_remove_non_printable_chars
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: latexpdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthijs Ooms
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|