diff --git a/CHANGES b/CHANGES index 56bb70001e6..cc7c314dd4b 100644 --- a/CHANGES +++ b/CHANGES @@ -41,6 +41,7 @@ Bugs fixed * #9649: HTML search: when objects have the same name but in different domains, return all of them as result instead of just one. * #9678: linkcheck: file extension was shown twice in warnings +* Fix bug ``.. code::`` recognising ``:classes:`` option instead of ``:class:`` option. The new behaviour is to only accept the ``:class:`` option. Testing -------- diff --git a/sphinx/directives/patches.py b/sphinx/directives/patches.py index 9a3034daea5..428ae0ba4ee 100644 --- a/sphinx/directives/patches.py +++ b/sphinx/directives/patches.py @@ -152,6 +152,7 @@ class Code(SphinxDirective): def run(self) -> List[Node]: self.assert_has_content() + set_classes(self.options) code = '\n'.join(self.content) node = nodes.literal_block(code, code, classes=self.options.get('classes', []),