erbtex 0.4.1 → 0.4.2
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 +4 -4
- data/.gitignore +0 -2
- data/Gemfile.lock +1 -1
- data/lib/erbtex/runner.rb +10 -1
- data/lib/erbtex/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f067b2e9d4e0a83eb0a956c21623146a1a0bc5471ebc6b0c2f1f6d623c2536b4
|
4
|
+
data.tar.gz: 1cf76c21cdd007c9c2d19339ac8d85bd67a094119788f5d3755997b41a16301c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af2c459fdb7d898bce5857bcd54513db08bc16b10362aa14ccff792c628d9f25728985b3efe800a4c5f46b46839d155cbf65014f5c573cfc5ad8478aa134bcb2
|
7
|
+
data.tar.gz: c48ca28f0cd277621ab711a973b69dbcd3d72a7b3bc6e2f2372e022be13bda12e84e6a420dfcd1cead428be08c9f25f62e5c08cc69243d2f7c9b92b8d68eb181
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/erbtex/runner.rb
CHANGED
@@ -113,7 +113,16 @@ module ErbTeX
|
|
113
113
|
in_file_absolute = File.absolute_path(File.expand_path(in_file))
|
114
114
|
in_dir = File.dirname(in_file_absolute)
|
115
115
|
in_base = File.basename(in_file_absolute)
|
116
|
-
|
116
|
+
# Note that File.extname only gets the last extension. We want all
|
117
|
+
# extensions following the basename, but we don't count a dot at the
|
118
|
+
# beginning of a filename as introducing an extension. So, we cook our
|
119
|
+
# own solution here with Regexp's.
|
120
|
+
if in_base =~ /[^.](.[^.]+)+\z/
|
121
|
+
in_ext = $1
|
122
|
+
in_base = File.basename(in_base, in_ext)
|
123
|
+
else
|
124
|
+
in_ext = ''
|
125
|
+
end
|
117
126
|
|
118
127
|
out_ext = if in_ext.empty?
|
119
128
|
if File.exist?("#{in_file}.tex.erb")
|
data/lib/erbtex/version.rb
CHANGED