From ff2b1624c08ba80b6a5132601fddc4835467c9a0 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Fri, 20 May 2022 16:45:44 -0500 Subject: Cleaned up/expanded some docstrings and docs to reflect new 3.0.10 changes --- docs/whats_new_in_3_0_0.rst | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/whats_new_in_3_0_0.rst b/docs/whats_new_in_3_0_0.rst index 6eb8530..5c467b1 100644 --- a/docs/whats_new_in_3_0_0.rst +++ b/docs/whats_new_in_3_0_0.rst @@ -4,11 +4,11 @@ What's New in Pyparsing 3.0.0 :author: Paul McGuire -:date: April, 2022 +:date: May, 2022 :abstract: This document summarizes the changes made in the 3.0.0 release of pyparsing. - (Updated to reflect changes up to 3.0.8) + (Updated to reflect changes up to 3.0.10) .. sectnum:: :depth: 4 @@ -62,6 +62,20 @@ generator for documenting pyparsing parsers.:: # save as HTML parser.create_diagram('parser_rr_diag.html') +``create_diagram`` accepts these named arguments: + +- ``vertical`` (int) - threshold for formatting multiple alternatives vertically + 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 +- ``embed`` - bool flag whether generated HTML should omit ````, ````, and ```` tags to embed + the resulting HTML in an enclosing HTML source (new in 3.0.10) +- ``head`` - str containing additional HTML to insert into the ```` section of the + generated code; can be used to insert custom CSS styling +- ``body`` - str containing additional HTML to insert at the beginning of the ```` section of the + generated code + To use this new feature, install the supporting diagramming packages using:: pip install pyparsing[diagrams] -- cgit v1.2.1