diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-09-13 10:51:15 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-09-13 10:51:15 +0900 |
commit | 0b44e68d4fed408453859dd9a83dc3ee68d90c7f (patch) | |
tree | 6716f861446243dd10faf4d1076bd3e811a16bd7 | |
parent | be714fa75b2eece4fa388680b881fdc641e778e4 (diff) | |
parent | b5dc3adf66ff70d8d6fe076954bfd0dfd13736a6 (diff) | |
download | sphinx-git-0b44e68d4fed408453859dd9a83dc3ee68d90c7f.tar.gz |
Merge branch '3.2.x' into 3.x
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | sphinx/domains/c.py | 6 | ||||
-rw-r--r-- | sphinx/domains/cpp.py | 2 | ||||
-rw-r--r-- | tests/test_build_html.py | 8 |
4 files changed, 17 insertions, 3 deletions
@@ -44,6 +44,10 @@ Features added Bugs fixed ---------- +* #8188: C, add missing items to internal object types dictionary, + e.g., preventing intersphinx from resolving them. + + Testing -------- diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index d8ccc2e3d..c759dacbd 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -1792,7 +1792,7 @@ class Symbol: if not declaration: if Symbol.debug_lookup: - Symbol.debug_print("no delcaration") + Symbol.debug_print("no declaration") Symbol.debug_indent -= 2 # good, just a scope creation # TODO: what if we have more than one symbol? @@ -3607,6 +3607,10 @@ class CDomain(Domain): 'macro': ObjType(_('macro'), 'macro'), 'type': ObjType(_('type'), 'type'), 'var': ObjType(_('variable'), 'data'), + 'enum': ObjType(_('enum'), 'enum'), + 'enumerator': ObjType(_('enumerator'), 'enumerator'), + 'struct': ObjType(_('struct'), 'struct'), + 'union': ObjType(_('union'), 'union'), } directives = { diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 92d578427..7b10f8166 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -4292,7 +4292,7 @@ class Symbol: if not declaration: if Symbol.debug_lookup: - Symbol.debug_print("no delcaration") + Symbol.debug_print("no declaration") Symbol.debug_indent -= 2 # good, just a scope creation # TODO: what if we have more than one symbol? diff --git a/tests/test_build_html.py b/tests/test_build_html.py index e949f1157..1efc6c14a 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -10,8 +10,10 @@ import os import re +from distutils.version import LooseVersion from itertools import cycle, chain +import pygments import pytest from html5lib import HTMLParser @@ -1591,4 +1593,8 @@ def test_html_codeblock_linenos_style_inline(app): app.build() content = (app.outdir / 'index.html').read_text() - assert '<span class="lineno">1 </span>' in content + pygments_version = tuple(LooseVersion(pygments.__version__).version) + if pygments_version > (2, 7): + assert '<span class="linenos">1</span>' in content + else: + assert '<span class="lineno">1 </span>' in content |