Skip to content

Commit

Permalink
fix(decorations): Better unknown key error msg
Browse files Browse the repository at this point in the history
Fully expand `\pgfkeyscurrentname` before being used in first-arg of
`/errors/unknown key`.

Co-authored-by: Henri Menke <henri@henrimenke.de>
Signed-off-by: muzimuzhi <muzimuzhi@gmail.com>
  • Loading branch information
muzimuzhi and hmenke committed Dec 8, 2021
1 parent 44ed3eb commit cb21347
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
/pgf/decoration/.unknown/.code=%
\pgfifdecoration{\pgfkeyscurrentname}{\edef\tikz@decoration@name{\pgfkeyscurrentname}}
{\pgfifmetadecoration{\pgfkeyscurrentname}{\edef\tikz@decoration@name{\pgfkeyscurrentname}}
% Fully expand `\pgfkeyscurrentname' before being used in first-arg of
% `/errors/unknown key'.
{\pgfkeys{/errors/unknown
key={/pgf/decoration/\pgfkeyscurrentname}{#1}}}},%
key/.expanded={/pgf/decoration/\pgfkeyscurrentname}{\unexpanded{#1}}}}},%
/pgf/decoration/raise/.code={\def\tikz@dec@shift{\pgftransformyshift{#1}}\tikz@dec@trans},
/pgf/decoration/mirror/.code={%
\csname if#1\endcsname
Expand Down

0 comments on commit cb21347

Please sign in to comment.