Skip to content

Commit

Permalink
Use the ".. jinja" tag to render support_matrix template
Browse files Browse the repository at this point in the history
.. and remove the substring check for the file.

this fixes the problem with sphinx 7.2.2 that the "docname" can
be None (see sphinx-doc/sphinx#11620)
  • Loading branch information
jepler committed Aug 22, 2023
1 parent 4593008 commit 2fc413d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions docs/rstjinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import re

def render_with_jinja(docname, source):
if "shared-bindings/support_matrix" in docname:
return True
if re.search('^\s+.. jinja$', source[0], re.M):
if re.search('^\s*.. jinja$', source[0], re.M):
return True
return False

Expand Down
2 changes: 2 additions & 0 deletions shared-bindings/support_matrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Only those boards that provide those modules will be listed.
To exclude boards that provide a module, type a "-" in front of the module name.
You can also type a regular expression as a filter.

.. jinja
.. raw:: html

<p id="support-matrix-filter-block"><input placeholder="Filter the boards by available modules" id="support-matrix-filter" type="text"/><span id="support-matrix-filter-num">(all)</span></p>
Expand Down

0 comments on commit 2fc413d

Please sign in to comment.