Skip to content

Commit

Permalink
Fix .lastretry pgf-tikz#672
Browse files Browse the repository at this point in the history
It looks like after \pgfkeys@try the .lastretry suffix is already discarded so
another discard will just leave an empty key.  I've also added a safeguard for
empty keys so that they produce slightly less obscure error messages.
  • Loading branch information
hmenke committed May 9, 2019
1 parent 6f21f63 commit 5397635
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion tex/generic/pgf/utilities/pgfkeys.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,11 @@
\fi%
\pgfkeys@splitter#2/%
}
\def\pgfkeys@gobbletoslash\pgfkeys@splitter/{\expandafter\pgfkeys@remove@slash\the\pgfkeys@pathtoks\relax}%
\def\pgfkeys@gobbletoslash\pgfkeys@splitter/{%
\if\relax\detokenize\expandafter{\the\pgfkeys@pathtoks}\relax\else
\expandafter\pgfkeys@remove@slash\the\pgfkeys@pathtoks\relax
\fi
}%
\def\pgfkeys@remove@slash#1/\relax{\pgfkeys@pathtoks{#1}}


Expand Down
2 changes: 0 additions & 2 deletions tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,6 @@
\ifpgfkeyssuccess\else
\pgfkeys@try
\ifpgfkeyssuccess\else
% discard the '.lastretry' suffix:
\edef\pgfkeyscurrentkey{\pgfkeyscurrentpath}%
\pgfkeys@split@path%
\pgfkeys@unknown
\fi
Expand Down

0 comments on commit 5397635

Please sign in to comment.