diff --git a/CHANGES b/CHANGES index fdaae64bb..c5f1f9fdc 100644 --- a/CHANGES +++ b/CHANGES @@ -22,7 +22,9 @@ Bugs fixed * #4863, #4938, #4939: i18n doesn't handle node.title correctly tat used for contents, topic, admonition, table and section. * #4913: i18n: literal blocks in bullet list are not translated -* #4962: cpp domain: raises TypeError on duplicate declaration +* #4962: C++, raised TypeError on duplicate declaration. +* #4825: C++, properly parse expr roles and give better error messages when + (escaped) line breaks are present. Testing -------- diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index fe339b153..23e8c642c 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -12,7 +12,7 @@ import re from copy import deepcopy -from docutils import nodes +from docutils import nodes, utils from docutils.parsers.rst import Directive, directives from six import iteritems, text_type @@ -5962,7 +5962,7 @@ class CPPExprRole(object): class Warner(object): def warn(self, msg): inliner.reporter.warning(msg, line=lineno) - + text = utils.unescape(text).replace('\n', ' ') env = inliner.document.settings.env parser = DefinitionParser(text, Warner(), env.config) try: