texzip 0.1.3 → 0.1.4
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.
- data/History.txt +6 -0
- data/Rakefile +1 -1
- data/lib/texzip/Project.rb +7 -4
- data/version.txt +1 -1
- metadata +3 -3
data/History.txt
CHANGED
data/Rakefile
CHANGED
|
@@ -19,7 +19,7 @@ Bones {
|
|
|
19
19
|
url 'http://darcsden.com/lyro/texzip'
|
|
20
20
|
depend_on 'bibtex-ruby', ['>= 1.2.1', '< 2.0']
|
|
21
21
|
depend_on 'trollop', '~> 1.16'
|
|
22
|
-
depend_on 'ffi-libarchive', '>= 0.1.
|
|
22
|
+
depend_on 'ffi-libarchive', '>= 0.1.3', '< 2.0'
|
|
23
23
|
depend_on 'ffi-inliner', '>= 0.2.4', '< 2.0'
|
|
24
24
|
depend_on 'highline', '~> 1.0'
|
|
25
25
|
gem.files files
|
data/lib/texzip/Project.rb
CHANGED
|
@@ -203,15 +203,18 @@ class TeXzip::Project < HighLine
|
|
|
203
203
|
block = method(:handle_command) unless block
|
|
204
204
|
|
|
205
205
|
included_files = []
|
|
206
|
+
text_without_comments = ""
|
|
206
207
|
text.each_line do |line|
|
|
207
208
|
comment_match = line.match /(?:\\)*%/
|
|
208
209
|
if comment_match and (comment_match.end(0) - comment_match.begin(0)).odd?
|
|
209
210
|
line = line[0...comment_match.end(0)]
|
|
210
211
|
end
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
text_without_comments.concat line
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
text_without_comments.scan(/\\(documentclass|usepackage|include|input|includegraphics|bibliography|cite)(?:\[[^\]]+\])?\{([^}]+)\}/) do |cmd, arg|
|
|
216
|
+
new_files = block.call cmd, arg
|
|
217
|
+
included_files.concat new_files if new_files
|
|
215
218
|
end
|
|
216
219
|
included_files
|
|
217
220
|
end
|
data/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.4
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: texzip
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.4
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Frank Fischer
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2011-04-
|
|
13
|
+
date: 2011-04-20 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bibtex-ruby
|
|
@@ -45,7 +45,7 @@ dependencies:
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - ">="
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: 0.1.
|
|
48
|
+
version: 0.1.3
|
|
49
49
|
type: :runtime
|
|
50
50
|
version_requirements: *id003
|
|
51
51
|
- !ruby/object:Gem::Dependency
|