File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 1+ """
2+ sphinxnotes.snippet.builder
3+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4+
5+ Dummy builder for triggering extension.
6+
7+ :copyright: Copyright 2021 Shengyu Zhang.
8+ :license: BSD, see LICENSE for details.
9+ """
10+
11+ from sphinx .builders .dummy import DummyBuilder
12+ from sphinx .locale import __
13+
14+
15+ class Builder (DummyBuilder ):
16+ name = 'snippet'
17+ epilog = __ ('The snippet builder is a dummy builder for triggering extension.' )
Original file line number Diff line number Diff line change 2626from .cache import Cache , Item
2727from .keyword import Extractor
2828from .utils .titlepath import resolve_fullpath , resolve_docpath
29+ from .builder import Builder
2930
3031
3132logger = logging .getLogger (__name__ )
@@ -119,6 +120,8 @@ def on_builder_finished(app:Sphinx, exception) -> None:
119120
120121
121122def setup (app :Sphinx ):
123+ app .add_builder (Builder )
124+
122125 app .add_config_value ('snippet_config' , {}, '' )
123126 app .add_config_value ('snippet_patterns' , {'*' :'.*' }, '' )
124127
You can’t perform that action at this time.
0 commit comments