camlspotter avatar camlspotter committed d28e463

doc fix

Comments (0)

Files changed (1)

         else:
             m = re.match("^\s*([A-Za-z_0-9\.]+\(.*\))\s*=", line) # a function
             if m:
-                heading = ".. function:: " + m.group(1) + "\n\n"
+                heading = ".. index::\n    " + m.group(1) + "\n\n" + m.group(1) + "\n\n"
             else:
                 m = re.match("^\s*([A-Za-z_0-9\[\]\.]+)\s*=(.*)", line) # a variable
                 if m:
-                    heading = ".. function:: " + m.group(1) + " variable\n\n" # CR variable required since py context add () otherwise
+                    heading = ".. index::\n    single: " + m.group(1) + "\n\n" + m.group(1) + "\n" # CR variable required since py context add () otherwise
                     if not re.match("^\s*$", m.group(2)):
                         formatted = ["\n", "::", "\n", "\n", "    = " + m.group(2) + "\n\n"] + formatted
                 elif re.match(":", line): # a rule
-                    heading = ".. function:: " + line  + "\n"
+                    heading = ".. index::\n    single: " + line + "\n\n" + line  + "\n"
                 else: # an expr
-                    heading = ".. function:: " + line + "\n"
+                    heading = ".. index::\n    single: " + line + "\n\n" + line + "\n"
     if heading == None:
         ()
     elif heading == "":
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.