Repository: d0c-s4vage/lookatme (language: python)

Issue:
Progressive slides have zero documentation
**Describe the bug**
We need to update the documentation for lookatme with the new progressive slides feature.


Discussion / hints:

Fix patch:
diff --git a/README.md b/README.md
index 8978e2b..50e9dd8 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,7 @@ tool.
 * Loading external files into code blocks
 * Support for contrib extensions
 * Smart slide splitting
+* Progressive slides with `<!-- stop -->` comments between block elements
 
 ### Tour
 
@@ -63,30 +64,25 @@ Usage: lookatme [OPTIONS] [INPUT_FILES]...
 
   lookatme - An interactive, terminal-based markdown presentation tool.
 
-  See https://lookatme.readthedocs.io/en/v{{VERSION}} for documentation
+  See https://lookatme.readthedocs.io/en/v2.4.1 for documentation
 
 Options:
   --debug
   -l, --log PATH
   -t, --theme [dark|light]
-  --style [default|emacs|friendly|colorful|autumn|murphy|manni|monokai|perldoc|pastie|borland|trac|native|fruity|bw|vim|vs|tango|rrt|xcode|igor|paraiso-light|paraiso-dark|lovelace|algol|algol_nu|arduino|rainbow_dash|abap|solarized-dark|solarized-light|sas|stata|stata-light|stata-dark|inkpot]
+  --style [default|emacs|friendly|friendly_grayscale|colorful|autumn|murphy|manni|material|monokai|perldoc|pastie|borland|trac|native|fruity|bw|vim|vs|tango|rrt|xcode|igor|paraiso-light|paraiso-dark|lovelace|algol|algol_nu|arduino|rainbow_dash|abap|solarized-dark|solarized-light|sas|staroffice|stata|stata-light|stata-dark|inkpot|zenburn|gruvbox-dark|gruvbox-light|dracula|one-dark|lilypond|nord|nord-darker|github-dark]
   --dump-styles                   Dump the resolved styles that will be used
                                   with the presentation to stdout
-
   --live, --live-reload           Watch the input filename for modifications
                                   and automatically reload
-
   -s, --safe                      Do not load any new extensions specified in
                                   the source markdown. Extensions specified
                                   via env var or -e are still loaded
-
   --no-ext-warn                   Load new extensions specified in the source
                                   markdown without warning
-
   -i, --ignore-ext-failure        Ignore load failures of extensions
   -e, --exts TEXT                 A comma-separated list of extension names to
                                   automatically load (LOOKATME_EXTS)
-
   --single, --one                 Render the source as a single slide
   --version                       Show the version and exit.
   --help                          Show this message and exit.
diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst
index 0f1cb50..93f7b4b 100644
--- a/docs/source/getting_started.rst
+++ b/docs/source/getting_started.rst
@@ -20,7 +20,7 @@ The ``lookatme`` CLI has a few options to control it's behavior:
 
 .. code-block:: text
 
-    Usage: lookatme [OPTIONS] [INPUT_FILES]...
+   Usage: lookatme [OPTIONS] [INPUT_FILES]...
 
       lookatme - An interactive, terminal-based markdown presentation tool.
 
@@ -30,24 +30,19 @@ The ``lookatme`` CLI has a few options to control it's behavior:
       --debug
       -l, --log PATH
       -t, --theme [dark|light]
-      --style [default|emacs|friendly|colorful|autumn|murphy|manni|monokai|perldoc|pastie|borland|trac|native|fruity|bw|vim|vs|tango|rrt|xcode|igor|paraiso-light|paraiso-dark|lovelace|algol|algol_nu|arduino|rainbow_dash|abap|solarized-dark|solarized-light|sas|stata|stata-light|stata-dark|inkpot]
+      --style [default|emacs|friendly|friendly_grayscale|colorful|autumn|murphy|manni|material|monokai|perldoc|pastie|borland|trac|native|fruity|bw|vim|vs|tango|rrt|xcode|igor|paraiso-light|paraiso-dark|lovelace|algol|algol_nu|arduino|rainbow_dash|abap|solarized-dark|solarized-light|sas|staroffice|stata|stata-light|stata-dark|inkpot|zenburn|gruvbox-dark|gruvbox-light|dracula|one-dark|lilypond|nord|nord-darker|github-dark]
       --dump-styles                   Dump the resolved styles that will be used
                                       with the presentation to stdout
-
       --live, --live-reload           Watch the input filename for modifications
                                       and automatically reload
-
       -s, --safe                      Do not load any new extensions specified in
                                       the source markdown. Extensions specified
                                       via env var or -e are still loaded
-
       --no-ext-warn                   Load new extensions specified in the source
                                       markdown without warning
-
       -i, --ignore-ext-failure        Ignore load failures of extensions
       -e, --exts TEXT                 A comma-separated list of extension names to
                                       automatically load (LOOKATME_EXTS)
-
       --single, --one                 Render the source as a single slide
       --version                       Show the version and exit.
       --help                          Show this message and exit.
diff --git a/docs/source/index.rst b/docs/source/index.rst
index fba655c..8e8a51b 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -67,6 +67,25 @@ A basic, optional YAML header may be included at the top of the slides:
 
     Some text
 
+Slides can be progressively rendered by adding ``<!-- stop -->`` comments
+between block elements (paragraphs, tables, lists, etc.):
+
+.. code-block:: md
+
+   # Progressive Slide
+
+   <!-- stop -->
+
+   Paragraph 1
+
+   <!-- stop -->
+
+   Paragraph 2
+
+   <!-- stop -->
+
+   Paragraph 3
+
 .. toctree::
   :maxdepth: 2
 
diff --git a/examples/tour.md b/examples/tour.md
index a4bb424..d77b2ae 100644
--- a/examples/tour.md
+++ b/examples/tour.md
@@ -97,6 +97,30 @@ A quote is below:
 
 ---
 
+# Progressive Slides
+
+Add a `<!-- stop -->` comment between paragraphs to progressively render
+the current slide!
+
+For example, the markdown in the codeblock below is used at the end of this
+slide:
+
+```markdown
+paragraph 1
+
+<!-- stop -->
+
+paragraph 2
+```
+
+paragraph 1
+
+<!-- stop -->
+
+paragraph 2
+
+---
+
 # Extensions
 
 lookatme supports extensions that can add additional functionality to lookatme


Test patch:
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 87bd191..178599f 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -76,10 +76,35 @@ def test_parse_slides():
 More text
     """
     parser = Parser()
-    slides = parser.parse_slides({}, input_data)
+    _, slides = parser.parse_slides({}, input_data)
     assert len(slides) == 2
 
 
+def test_parse_slides_with_progressive_stops_and_hrule_splits():
+    """Test that slide parsing works correctly
+    """
+    input_data = r"""
+# Heading
+
+<!-- stop -->
+
+p1
+
+<!-- stop -->
+
+p2
+
+---
+
+# Slide 2
+
+More text
+    """
+    parser = Parser()
+    _, slides = parser.parse_slides({}, input_data)
+    assert len(slides) == 4
+
+
 def test_parse_smart_slides_one_h1():
     """Test that slide smart splitting works correctly
     """