Skip to content

Commit

Permalink
Make auto default
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Oct 14, 2024
1 parent ebe86cf commit 502d954
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pymdownx/blocks/caption.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def __init__(self, *args, **kwargs):
"Depth of children to add prefixes to - Default: 0"
],
"auto": [
False,
True,
"Auto add IDs with prefixes (prefixes are only added if prefix template is defined) - Default: False"
],
"prepend": [
Expand Down
9 changes: 6 additions & 3 deletions tests/test_extensions/test_blocks/test_captions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ class TestBlocksCaption(util.MdCase):
"""Test Blocks caption cases with default configuration."""

extension = ['pymdownx.blocks.caption', 'md_in_html', 'pymdownx.blocks.html']
extension_configs = {
'pymdownx.blocks.caption': {
'auto': False
}
}

def test_caption(self):
"""Test basic caption."""
Expand Down Expand Up @@ -245,6 +250,7 @@ class TestBlocksCaptionPrefix(util.MdCase):
extension = ['pymdownx.blocks.caption', 'md_in_html']
extension_configs = {
'pymdownx.blocks.caption': {
'auto': False
}
}

Expand Down Expand Up @@ -488,7 +494,6 @@ class TestBlocksCaptionAutoPrefix(util.MdCase):
extension = ['pymdownx.blocks.caption', 'md_in_html']
extension_configs = {
'pymdownx.blocks.caption': {
'auto': True
}
}

Expand Down Expand Up @@ -846,7 +851,6 @@ class TestBlocksCaptionAutoLevel(util.MdCase):
extension = ['pymdownx.blocks.caption']
extension_configs = {
'pymdownx.blocks.caption': {
"auto": True,
'auto_level': 2
}
}
Expand Down Expand Up @@ -972,7 +976,6 @@ class TestBlocksCaptionAutoLevelPrepend(util.MdCase):
extension = ['pymdownx.blocks.caption']
extension_configs = {
'pymdownx.blocks.caption': {
'auto': True,
'auto_level': 2,
'prepend': True
}
Expand Down

0 comments on commit 502d954

Please sign in to comment.