Skip to content

Commit

Permalink
1.5.4dev: fix generating apidoc with Sphinx 5 and adapt to Python 3 (…
Browse files Browse the repository at this point in the history
…closes #13565)

[skip ci]


git-svn-id: http://trac.edgewall.org/intertrac/log:/trunk@17676 af82e41b-90c4-0310-8c96-b1721e28e2e2
  • Loading branch information
jomae committed Feb 11, 2023
1 parent a3c13ab commit 6cc201f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 2 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
from trac.util import get_pkginfo

try:
from pygments.lexers.templates import DjangoLexer
html_jinja_lexer = DjangoLexer()
from pygments.lexers.templates import DjangoLexer as html_jinja_lexer
except ImportError:
html_jinja_lexer = None

Expand Down Expand Up @@ -84,7 +83,7 @@
# -- Link to other Sphinx documentations
extensions.append('sphinx.ext.intersphinx')

intersphinx_mapping = {'python': ('https://docs.python.org/2.7', None)}
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}

# -- Keep track of :todo: items
extensions.append('sphinx.ext.todo')
Expand Down
4 changes: 0 additions & 4 deletions trac/util/presentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,13 @@ def htmlattr_filter(_eval_ctx, d, autospace=True):
'style': {'border-radius': '3px' if rounded,
'background': '#f7f7f7'}
}|htmlattr}>
...
</ul>
Results in something like this:
.. sourcecode:: html
<ul class="my list" id="list-42" checked="checked" autocomplete="on"
style="border-radius: 3px; background: #f7f7f7">
...
</ul>
As you can see it automatically prepends a space in front of the item
if the filter returned something unless the second parameter is false.
Expand Down

0 comments on commit 6cc201f

Please sign in to comment.