Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling: Relevant #645

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/extensions/relevant_to.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Relevent To
Relevant To
===========

The ``esbonio.relevant_to`` extension is similar to the `sphinx-panels`_ and `sphinx-tabs`_ extensions, where you can define sections of documentation that is only relevant to a given subject (e.g. Python version) and be able to choose between them.
Expand Down Expand Up @@ -37,9 +37,9 @@ Ensure that the extension is enabled by including ``esbonio.relevant_to`` in the
]


Then within your documentation, "relevant sections" are defined using the :rst:dir:`relevent-to` directive.
Then within your documentation, "relevant sections" are defined using the :rst:dir:`relevant-to` directive.

.. rst:directive:: relevent-to
.. rst:directive:: relevant-to

Define sections that can be swapped out based on the chosen subject.
Consider the following example.
Expand Down
4 changes: 2 additions & 2 deletions lib/esbonio-extensions/esbonio/relevant_to/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class relevant_section(nodes.Element):
...


def visit_relevent_section(self, node: relevant_section):
def visit_relevant_section(self, node: relevant_section):
# Swap the body out for an empty one so we can capture all the content that
# should be written to a separate file
node.page_body = self.body
Expand Down Expand Up @@ -197,7 +197,7 @@ def apply(self):
def setup(app: Sphinx):
app.add_directive("relevant-to", RelevantTo)
app.add_node(
relevant_section, html=(visit_relevent_section, depart_relevant_section)
relevant_section, html=(visit_relevant_section, depart_relevant_section)
)
app.add_node(
relevant_to_script, html=(visit_relevant_to_script, depart_relevant_to_script)
Expand Down
Loading