From 9ee9d31ed66b53ce8d6e533e2d2cbe9f1c5b1ded Mon Sep 17 00:00:00 2001 From: Stella Date: Wed, 20 Nov 2024 16:07:50 +0100 Subject: [PATCH] Fix bug in dict conversion in docstring (fixes #184) --- deploy/docs_conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/docs_conversion.py b/deploy/docs_conversion.py index bffdfdd..3bd567b 100644 --- a/deploy/docs_conversion.py +++ b/deploy/docs_conversion.py @@ -165,7 +165,7 @@ def _create_r_example(doc_list): pattern_methods = re.compile(r'([A-Za-z]\d*)\.([A-Za-z]\d*)') pattern_list_idx = re.compile(r'\w\[(\d+)]') pattern_list = re.compile(r'\[([\'\"\w(),\s]+)]') - pattern_dict = re.compile(r'{(([\'\"]*[\w\d()]+[\'\"]*: [\'\"]*[\w\d]+\'*,*\s*)+)}') + pattern_dict = re.compile(r'\{(([\'\"]*[\w().]+[\'\"]*: [\'\"]*[\w.]+\'*,*\s*)+)}') pattern_ws = re.compile(r'\s{2,}') pattern_doctest = re.compile(r'\s+# doctest:.*')