Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
joapuiib committed Nov 12, 2024
1 parent 0c128b1 commit e8d9d58
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mkdocs_static_i18n/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,9 @@ def on_page_markdown(self, markdown, page, config, files):
if "pymdownx.details" in config["markdown_extensions"]:
marker = r"(?:\?{3}\+?|!{3})" # Admonition or Details marker

RE = re.compile(
r'^('
+ marker
+ r' ?)([\w\-]+(?: +[\w\-]+)*)(?: +"(.*?)")? *$'
) # Copied from https://github.com/Python-Markdown/markdown/blob/master/markdown/extensions/admonition.py and modified for a single-line processing
# Adapted to match the details extension as well
# Copied from https://github.com/Python-Markdown/markdown/blob/master/markdown/extensions/admonition.py and modified for a single-line processing
# Adapted to match the details extension as well
RE = re.compile('^(' + marker + r' ?)([\w\-]+(?: +[\w\-]+)*)(?: +"(.*?)")? *$')

def handle_admonition_translations(line):
m = RE.match(line)
Expand Down

0 comments on commit e8d9d58

Please sign in to comment.