flap
flap copied to clipboard
Conditional `\makeindex` makes compilation fail with `ValueError: not enough values to unpack (expected 2, got 1)`
Simple reproducer:
\ifdefined\tikzexternalrealjob{} % This could be any conditional
\else
\makeindex
\fi
Backtrace
FLaP 0.6.0
Traceback (most recent call last):
File "/home/mcantan/.local/bin/flap", line 8, in <module>
sys.exit(main())
File "/home/mcantan/.local/lib/python3.10/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/mcantan/.local/lib/python3.10/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/mcantan/.local/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/mcantan/.local/lib/python3.10/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/ui.py", line 117, in main
.run(tex_file, output)
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/ui.py", line 43, in run
request.execute()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/engine.py", line 84, in execute
tokens = self._rewrite(self.read_root_tex,
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/engine.py", line 94, in _rewrite
return parser.rewrite()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 90, in rewrite
result += self._rewrite_one()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 98, in _rewrite_one
return self._rewrite_command()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 114, in _rewrite_command
return macro.rewrite(self)
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/macros/commons.py", line 54, in rewrite
return self._execute(parser, invocation)
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/macros/bibliography.py", line 62, in _execute
style_file = self._fetch_style_file(parser, invocation)
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/macros/bibliography.py", line 70, in _fetch_style_file
_, value = each.split("=")
ValueError: not enough values to unpack (expected 2, got 1)
The error is similar to #35 but the traceback is different