Browse Source

kamailio-kemi-framework/tools/kemidocs.py: output format update

- use code block for function prototype with cpp highliting mode
- explicit link to kamailio.cfg corresponding function
Daniel-Constantin Mierla 4 năm trước cách đây
mục cha
commit
2bc667d3cb
1 tập tin đã thay đổi với 5 bổ sung3 xóa
  1. 5 3
      kamailio-kemi-framework/tools/kemidocs.py

+ 5 - 3
kamailio-kemi-framework/tools/kemidocs.py

@@ -83,9 +83,11 @@ class ModuleDocGenerator(object):
                 params_value = value["params"]
 
             # Generate the output string for the markdown page
-            self.markdown_string += "<a target='_blank' href='/docs/modules/devel/modules/" + module + ".html#" \
-                                    + module + ".f." + value["name"] + "'> `" + return_value + " " + value["name"] \
-                                    + "(" + params_value + ")` </a>\n\n"
+            self.markdown_string += "```cpp\n" + return_value + " KSR." + module_prefix + value["name"] \
+                                    + "(" + params_value + ");\n```\n\n" \
+
+            self.markdown_string += "  * <a target='_blank' href='/docs/modules/devel/modules/" + module + ".html#" \
+                                    + module + ".f." + value["name"] + "'>📖 kamailio.cfg::" + value["name"] + "()</a>\n\n"
 
             func_doc = self.read_file_to_string(module + "/" + module + "." + value["name"] + ".md").strip()
             if len(func_doc)>0: