Skip to content

Commit

Permalink
Merge pull request #29 from neatc0der/release/v2.1.3
Browse files Browse the repository at this point in the history
Release/v2.1.3
  • Loading branch information
neatc0der authored Oct 16, 2021
2 parents 05c8fe5 + b03dafc commit dff5d6a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion changelog/v2.1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@

* Fixes [superfences bug](https://github.com/neatc0der/mkdocs-markmap/issues/19)
* Updates distribute workflow

3 changes: 3 additions & 0 deletions changelog/v2.1.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# v2.1.3

* Fixes [superfences 9.0 bug](https://github.com/neatc0der/mkdocs-markmap/issues/27)
2 changes: 1 addition & 1 deletion mkdocs_markmap/__meta__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PACKAGE_NAME = 'mkdocs_markmap'
PROJECT_NAME = PACKAGE_NAME.replace('_', '-')
PROJECT_VERSION = '2.1.2'
PROJECT_VERSION = '2.1.3'

OWNER = 'neatc0der'
REPOSITORY_NAME = f'{OWNER}/{PROJECT_NAME}'
5 changes: 3 additions & 2 deletions mkdocs_markmap/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,18 @@ def extendMarkdown(self, md: Markdown, md_globals: Dict[str, str]) -> None:
md.preprocessors.register(MarkmapPreprocessor(md, self.getConfigs()), 'include_markmap', 102)
for extension in md.registeredExtensions:
if extension.__class__.__name__ == 'SuperFencesCodeExtension':
log.info(f'superfences detected by markmap')
try:
from pymdownx.superfences import default_validator, fence_code_format, _formatter, _validator
extension.extend_super_fences(
'markmap',
partial(_formatter, class_name='language-markmap', _fmt=fence_code_format),
partial(_validator, validator=default_validator, _legacy=False)
partial(_validator, validator=default_validator)
)
break

except ImportError as e:
log.warning(f'detected pymdownx.superfences, but import is not working: {e}')
log.warning(f'markmap detected pymdownx.superfences, but import is not working: {e}')

except Exception as e:
log.error(f'unexpected error: {e}')

0 comments on commit dff5d6a

Please sign in to comment.