Module: kamailio
Branch: master
Commit: 999d0c65402c99491683d694d77a01a5c1f91ecf
URL:
https://github.com/kamailio/kamailio/commit/999d0c65402c99491683d694d77a01a…
Author: tsearle <torrey.searle(a)wavecrest.com>
Committer: GitHub <noreply(a)github.com>
Date: 2024-04-24T11:28:49+02:00
tools/kemi: escape docstrings when required (#3824)
some of the documentation contains \ which need escaping
---
Modified: misc/tools/kemi/python_mock/kemi_mock.py
---
Diff:
https://github.com/kamailio/kamailio/commit/999d0c65402c99491683d694d77a01a…
Patch:
https://github.com/kamailio/kamailio/commit/999d0c65402c99491683d694d77a01a…
---
diff --git a/misc/tools/kemi/python_mock/kemi_mock.py
b/misc/tools/kemi/python_mock/kemi_mock.py
index 145fcb34b3a..918551a1887 100755
--- a/misc/tools/kemi/python_mock/kemi_mock.py
+++ b/misc/tools/kemi/python_mock/kemi_mock.py
@@ -129,7 +129,7 @@ def generate_function_doc(module_name, func, prefix):
print(prefix + "\t\"\"\"")
documentation_lines =
documentation[module_name]["functions"][function_prefix].split("\n")
for line in documentation_lines:
- print(prefix + "\t" + line)
+ print(prefix + "\t" + line.replace("\\",
"\\\\\\\\"))
print(prefix + "\t\"\"\"")
break