mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
C++, handle (escaped) line breaks in epxr role
Fixes sphinx-doc/sphinx#4825
This commit is contained in:
parent
b7b1db0f18
commit
d8ac86a2bb
4
CHANGES
4
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
|
||||
--------
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user