mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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.
This commit is contained in:
parent
9234d0b08d
commit
316451de81
@ -330,11 +330,11 @@ class WarningStream:
|
|||||||
def write(self, text: str) -> None:
|
def write(self, text: str) -> None:
|
||||||
matched = report_re.search(text)
|
matched = report_re.search(text)
|
||||||
if not matched:
|
if not matched:
|
||||||
logger.warning(text.rstrip("\r\n"))
|
logger.warning(text.rstrip("\r\n"), type="docutils")
|
||||||
else:
|
else:
|
||||||
location, type, level = matched.groups()
|
location, type, level = matched.groups()
|
||||||
message = report_re.sub('', text).rstrip()
|
message = report_re.sub('', text).rstrip()
|
||||||
logger.log(type, message, location=location)
|
logger.log(type, message, location=location, type="docutils")
|
||||||
|
|
||||||
|
|
||||||
class LoggingReporter(Reporter):
|
class LoggingReporter(Reporter):
|
||||||
|
Loading…
Reference in New Issue
Block a user