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 CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.1.4 / 2011-04-20
2
+ * Scan all files at once instead of linewise to deal with commands
3
+ over multiple lines
4
+ * depend on ffi-libarchive >= 0.1.3 for correct handling with binary
5
+ string
6
+
1
7
  == 0.1.3 / 2011-04-12
2
8
  * Rename texpack to texzip
3
9
 
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.2', '< 2.0'
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
@@ -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
- line.scan(/\\(documentclass|usepackage|include|input|includegraphics|bibliography|cite)(?:\[[^\]]+\])?\{([^}]+)\}/) do |cmd, arg|
212
- new_files = block.call cmd, arg
213
- included_files.concat new_files if new_files
214
- end
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.3
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.3
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-12 00:00:00 Z
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.2
48
+ version: 0.1.3
49
49
  type: :runtime
50
50
  version_requirements: *id003
51
51
  - !ruby/object:Gem::Dependency