Procházet zdrojové kódy

Utilities/Sphinx: Index document types only by top level directory

We use the convention `Help/<type>/<doc>` for indexing each document as
an object of type `<type>`.  Split the document name on the first slash
rather than the last slash so that multi-level documents like
`Help/guide/tutorial/index.rst` are indexed as their top-level type.
Brad King před 6 roky
rodič
revize
b1b7d01172
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Utilities/Sphinx/cmake.py

+ 1 - 1
Utilities/Sphinx/cmake.py

@@ -251,7 +251,7 @@ class CMakeTransform(Transform):
         env = self.document.settings.env
 
         # Treat some documents as cmake domain objects.
-        objtype, sep, tail = env.docname.rpartition('/')
+        objtype, sep, tail = env.docname.partition('/')
         make_index_entry = _cmake_index_objs.get(objtype)
         if make_index_entry:
             title = self.parse_title(env.docname)