fix makefile output, ignore empty paths
This commit is contained in:
parent
0311fd91ae
commit
ccd3fa09a1
5
main.cpp
5
main.cpp
@ -333,6 +333,7 @@ InputExtractor::List InputExtractor::operator()(const Substring &input){
|
|||||||
CommandList IncludeCommands;
|
CommandList IncludeCommands;
|
||||||
|
|
||||||
IncludeCommands["input"] = [](List &l, std::string a) {
|
IncludeCommands["input"] = [](List &l, std::string a) {
|
||||||
|
if (a.empty()) return;
|
||||||
if (Extension(a) != ".tex") a += ".tex";
|
if (Extension(a) != ".tex") a += ".tex";
|
||||||
l.push_back(a);
|
l.push_back(a);
|
||||||
// try to extract all inputs of that file
|
// try to extract all inputs of that file
|
||||||
@ -440,7 +441,7 @@ int main(int argc, char ** args) {
|
|||||||
if (!output) {
|
if (!output) {
|
||||||
std::cout << "could not create output file" << std::endl;
|
std::cout << "could not create output file" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
output << "filename: ";
|
output << filename << ": ";
|
||||||
|
|
||||||
for (auto it = list.begin(); it != list.end(); it++) {
|
for (auto it = list.begin(); it != list.end(); it++) {
|
||||||
output << '\t';
|
output << '\t';
|
||||||
@ -454,7 +455,7 @@ int main(int argc, char ** args) {
|
|||||||
} else {
|
} else {
|
||||||
output << *it;
|
output << *it;
|
||||||
}
|
}
|
||||||
output << "\\\\\n";
|
output << "\t\\\n";
|
||||||
}
|
}
|
||||||
output << endl;
|
output << endl;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user