flap
flap copied to clipboard
flap is confused by the use of `\includesvg` as a parameter
To avoid compiling svgs during externalization, I have the following directive in my preamble:
\tikzset{external/optimize command away={\includesvg}{1}}
That confuses flap
, which says ValueError: Unexpected END_GROUP '}' in file 00-includes/preamble.tex (line 101, column 54).
Backtrace
% flap -v main.tex flapped
FLaP 0.6.0
File Line Column LaTeX Command
-------------------------------------------------------------------------------
main.tex 10 1 \input{00-includes/preamble.tex}
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/inlining.py", line 37, in _execute
return parser._spawn(parser._create.as_tokens(content, link), dict()).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 96, in _rewrite_one
return self._rewrite_group()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 105, in _rewrite_group
tokens += self._rewrite_one()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 96, in _rewrite_one
return self._rewrite_group()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 105, in _rewrite_group
tokens += self._rewrite_one()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 96, in _rewrite_one
return self._rewrite_group()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 105, in _rewrite_group
tokens += 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 53, in rewrite
invocation = self._parse(parser)
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/macros/commons.py", line 64, in _parse
self._capture_arguments(parser, invocation)
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/macros/commons.py", line 127, in _capture_arguments
invocation.append_argument("link", parser.capture_group())
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 237, in capture_group
tokens = self._accept(lambda token: token.begins_a_group)
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 135, in _accept
self._raise_unexpected_token()
File "/home/mcantan/.local/lib/python3.10/site-packages/flap/latex/parser.py", line 144, in _raise_unexpected_token
raise ValueError(error)
ValueError: Unexpected END_GROUP '}' in file 00-includes/preamble.tex (line 101, column 54).
I'll comment that line out and report the next error :)