Skip to content

Commit

Permalink
DOP-5130: Collapsible :expanded: option as boolean (#630)
Browse files Browse the repository at this point in the history
* expanded option as boolean

* PR feedback - example correction
  • Loading branch information
mmeigs authored Nov 12, 2024
1 parent 00c3a2d commit f51c435
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions snooty/rstspec.toml
Original file line number Diff line number Diff line change
Expand Up @@ -795,14 +795,14 @@ example = """.. facet::
help = """Card in a card-group. Each card links to the specified URI, and can include an icon, as well as a call-to-action string"""
options.heading = {type = "string", required = true}
options.sub_heading = "string"
options.expanded = "flag"
options.expanded = "boolean"
content_type = "block"
example = """.. collapsible::
:heading: ${1:Procdure}
:heading: ${1:Procedure}
:sub_heading: ${2:Description of what is inside the collapsible section}
:expanded:
:expanded: ${3:Boolean - default true}
${3:collapsible content block.}
${0:collapsible content block.}
"""

[directive."mongodb:wayfinding"]
Expand Down
4 changes: 2 additions & 2 deletions snooty/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3921,7 +3921,7 @@ def test_collapsible() -> None:
)


def test_collapsible_options() -> None:
def test_collapsible_options_true() -> None:
"""Test collapsible directive"""
path = FileId("test.rst")
project_config = ProjectConfig(ROOT_PATH, "", source="./")
Expand All @@ -3933,7 +3933,7 @@ def test_collapsible_options() -> None:
"""
.. collapsible::
:heading: This is a heading
:expanded:
:expanded: true
This is default-expanded collapsible content
""",
Expand Down

0 comments on commit f51c435

Please sign in to comment.