summaryrefslogtreecommitdiff
path: root/pyparsing/core.py
diff options
context:
space:
mode:
authorptmcg <ptmcg@austin.rr.com>2022-04-09 18:37:28 -0500
committerptmcg <ptmcg@austin.rr.com>2022-04-09 18:37:28 -0500
commit4e627f2948df8ad0eb0c3e90378e9a5c6660db3d (patch)
tree238b50a0ac7c88bd5ce0f2090f5f61c1fc446d77 /pyparsing/core.py
parent6afabf9889b8c5282126bf057296cef7696954c4 (diff)
downloadpyparsing-git-pyparsing_3.0.8.tar.gz
Added show_groups arg to create_diagram; prep for releasepyparsing_3.0.8
Diffstat (limited to 'pyparsing/core.py')
-rw-r--r--pyparsing/core.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pyparsing/core.py b/pyparsing/core.py
index bac4112..454bd57 100644
--- a/pyparsing/core.py
+++ b/pyparsing/core.py
@@ -2149,6 +2149,7 @@ class ParserElement(ABC):
output_html: Union[TextIO, Path, str],
vertical: int = 3,
show_results_names: bool = False,
+ show_groups: bool = False,
**kwargs,
) -> None:
"""
@@ -2161,7 +2162,7 @@ class ParserElement(ABC):
instead of horizontally (default=3)
- show_results_names - bool flag whether diagram should show annotations for
defined results names
-
+ - show_groups - bool flag whether groups should be highlighted with an unlabeled surrounding box
Additional diagram-formatting keyword arguments can also be included;
see railroad.Diagram class.
"""
@@ -2179,6 +2180,7 @@ class ParserElement(ABC):
self,
vertical=vertical,
show_results_names=show_results_names,
+ show_groups=show_groups,
diagram_kwargs=kwargs,
)
if isinstance(output_html, (str, Path)):