From d0a47512f363fe2b30570dd9b948dae6a44bda53 Mon Sep 17 00:00:00 2001 From: Geoffrey Poore Date: Sun, 6 Jun 2021 10:50:47 -0500 Subject: [PATCH] fixed bug in processing Pygments options (pygopt) when a key is used without a value (closes #181) --- pythontex/pythontex.dtx | 1 + pythontex/pythontex2.py | 2 +- pythontex/pythontex3.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pythontex/pythontex.dtx b/pythontex/pythontex.dtx index 7e591ed..8f459c2 100644 --- a/pythontex/pythontex.dtx +++ b/pythontex/pythontex.dtx @@ -171,6 +171,7 @@ % \begin{changelog}{v0.18}{2020/??/??} % \begin{itemize} % \item \texttt{\string\inputpygments} now checks inputted files for modification, so that typeset code will correctly update when the source is changed (\#162). +% \item Fixed bug in processing Pygments options (\texttt{pygopt}) when a key is used without a value (\#181). % \end{itemize} % \end{changelog} % diff --git a/pythontex/pythontex2.py b/pythontex/pythontex2.py index 4b95947..53ad0e7 100644 --- a/pythontex/pythontex2.py +++ b/pythontex/pythontex2.py @@ -437,7 +437,7 @@ def set_kv_pygments(k, v): elif v in ('false', 'False'): v = False else: - k = option + k = options v = True opt_dict[k] = v if family != ':GLOBAL': diff --git a/pythontex/pythontex3.py b/pythontex/pythontex3.py index bcf81ab..4a2596b 100644 --- a/pythontex/pythontex3.py +++ b/pythontex/pythontex3.py @@ -437,7 +437,7 @@ def set_kv_pygments(k, v): elif v in ('false', 'False'): v = False else: - k = option + k = options v = True opt_dict[k] = v if family != ':GLOBAL':