Skip to content

Commit 316451d

Browse files
authored
Add docutils type, to warnings originating from docutils (#12550)
As per other warning types, this helps users to better understand the root of the problem.
1 parent 9234d0b commit 316451d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sphinx/util/docutils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ class WarningStream:
330330
def write(self, text: str) -> None:
331331
matched = report_re.search(text)
332332
if not matched:
333-
logger.warning(text.rstrip("\r\n"))
333+
logger.warning(text.rstrip("\r\n"), type="docutils")
334334
else:
335335
location, type, level = matched.groups()
336336
message = report_re.sub('', text).rstrip()
337-
logger.log(type, message, location=location)
337+
logger.log(type, message, location=location, type="docutils")
338338

339339

340340
class LoggingReporter(Reporter):

0 commit comments

Comments
 (0)