Skip to content

Commit 8f84bd1

Browse files
committed
refactor: Extra context "sphinx" -> "app"
1 parent fb56526 commit 8f84bd1

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/tmpl.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Built-in Extra Contexts
182182

183183
The following extra contexts are available:
184184

185-
``sphinx``
185+
``app``
186186
:Phase: all
187187

188188
A proxy to the :py:class:`sphinx.application.Sphinx` object.
@@ -191,9 +191,9 @@ The following extra contexts are available:
191191
:style: grid
192192

193193
.. data.render::
194-
:extra: sphinx
194+
:extra: app
195195
196-
{% set app = load_extra('sphinx') %}
196+
{% set app = load_extra('app') %}
197197
198198
**{{ app.extensions | length }}**
199199
extensions are loaded.
@@ -306,7 +306,7 @@ __ https://jinja.palletsprojects.com/en/stable/templates/#builtin-filters
306306
{% set text = {'name': 'mimi'} %}
307307
308308
:Strify: ``{{ text }}``
309-
:JSONify: ``{{ text | jsonify }}``
309+
:JSONify: ``{{ text | jsonify | replace('\n', '')}}``
310310
311311
.. seealso:: :ref:`ext-filters`
312312

src/sphinxnotes/render/ext/extractx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def generate(self, directive: SphinxDirective | SphinxRole) -> Any:
6262
return proxy(find_current_section(parent))
6363

6464

65-
@extra_context('sphinx')
65+
@extra_context('app')
6666
class SphinxAppExtraContext(GlobalExtraContext):
6767
@override
6868
def generate(self, env: BuildEnvironment) -> Any:

0 commit comments

Comments
 (0)