D2 which
This commit is contained in:
parent
b995ec57e9
commit
0153dbdd29
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue