This commit is contained in:
Milka64 2023-12-10 08:42:48 +01:00
parent b995ec57e9
commit 0153dbdd29

View file

@ -4,9 +4,14 @@ from .d2lang import D2langDirective
from typing import Any, Dict, List, Tuple
from shutil import whitch
def setup(application: Sphinx) -> Dict[str, Any]:
"""
setup extension.
"""
application.add_directive('d2lang', D2langDirective)
return {"version": '0.0.1', "parallel_read_safe": True}
if which('d2'):
application.add_directive('d2lang', D2langDirective)
return {"version": '0.0.1', "parallel_read_safe": True}
else:
raise