浏览代码

Merge pull request #57112 from mhilbrunner/docs-fixes-main

Rémi Verschelde 3 年之前
父节点
当前提交
6a3ff8fa1f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      doc/tools/make_rst.py

+ 1 - 1
doc/tools/make_rst.py

@@ -438,7 +438,7 @@ def main():  # type: () -> None
 
     for path in args.path:
         # Cut off trailing slashes so os.path.basename doesn't choke.
-        if path.endswith(os.sep):
+        if path.endswith("/") or path.endswith("\\"):
             path = path[:-1]
 
         if os.path.basename(path) == "modules":