Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek committed Oct 7, 2023
1 parent 1c5d71d commit 9515089
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/mkdocs_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
r'^( *)((`{3,})[^ ].*) tab="(.+)"\n([\s\S]+?)\n\1\3$',
re.MULTILINE,
)
_config_example_regex = re.compile(
r'^( *)((`{3,})toml\b.*) config-example\n([\s\S]+?)\n\1\3$',
re.MULTILINE,
)


def _code_tab_replace(m):
indent, fence_start, fence_end, title, content = m.groups()
Expand All @@ -18,10 +23,6 @@ def _code_tab_replace(m):
{indent} {fence_end}
"""

_config_example_regex = re.compile(
r'^( *)((`{3,})toml\b.*) config-example\n([\s\S]+?)\n\1\3$',
re.MULTILINE,
)

def _config_example_replace(m):
indent, fence_start, fence_end, content = m.groups()
Expand All @@ -38,6 +39,7 @@ def _config_example_replace(m):
{indent} {fence_end}
"""


def on_config(config, **kwargs):
config.markdown_extensions.append(MyExtension())

Expand Down

0 comments on commit 9515089

Please sign in to comment.