Permalink
Browse files

Do not parse includes that contain a variable.

The script would search for a file with the variables name and not find one, fixes #2.
  • Loading branch information...
1 parent ccdf91e commit 18e9d9ca27de9ba4731d7c50e83d3eeb01e0e47e @infininight infininight committed Dec 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Support/lib/LaTeXUtils.rb
@@ -189,7 +189,7 @@ def initialize(old_scanner=nil)
# Default values for the +includes+ hash.
def set_defaults
@includes = Hash.new
- @includes[/^[^%]*(?:\\include|\\input)\s*\{([^\}]*)\}/] = Proc.new {|m|
+ @includes[/^[^%]*(?:\\include|\\input)\s*\{([^}\\]*)\}/] = Proc.new {|m|
m[0].split(",").map do |it|
LaTeX.find_file( it.strip, "tex", File.dirname(@root) ) || raise("Could not locate any file named '#{it}'")
end

0 comments on commit 18e9d9c

Please sign in to comment.