Fix #6813: An orphan warning is emitted for included document on Windows

This commit is contained in:
Takeshi KOMIYA 2019-11-16 22:15:13 +09:00
parent 7d0aa9594d
commit 155f4b0d00
2 changed files with 5 additions and 0 deletions

View File

@ -59,6 +59,9 @@ Bugs fixed
code-block long enough not to fit on one page
* #6809: LaTeX: code-block in a danger type admonition can easily spill over
bottom of page
* #6813: An orphan warning is emitted for included document on Windows. Thanks
to @drillan
Testing
--------

View File

@ -13,6 +13,7 @@ import os
from sphinx.locale import __
from sphinx.util import get_matching_files
from sphinx.util import logging
from sphinx.util import path_stabilize
from sphinx.util.matching import compile_matchers
from sphinx.util.osutil import SEP, relpath
@ -71,6 +72,7 @@ class Project:
filename = relpath(filename, self.srcdir)
for suffix in self.source_suffix:
if filename.endswith(suffix):
filename = path_stabilize(filename)
return filename[:-len(suffix)]
# the file does not have docname