mercurial/extensions.py
changeset 49091 2d519511c5c3
parent 49037 642e31cb55f0
child 49601 9d8757ddd0ab
--- a/mercurial/extensions.py	Thu Mar 24 22:04:38 2022 -0700
+++ b/mercurial/extensions.py	Thu Mar 24 22:05:13 2022 -0700
@@ -831,7 +831,7 @@
     for name, path in paths.items():
         doc = _disabledhelp(path)
         if doc and name != b'__index__':
-            exts[name] = doc.splitlines()[0]
+            exts[name] = stringutil.firstline(doc)
 
     return exts
 
@@ -935,7 +935,7 @@
         assert doc is not None  # help pytype
         if shortname:
             ename = ename.split(b'.')[-1]
-        exts[ename] = doc.splitlines()[0].strip()
+        exts[ename] = stringutil.firstline(doc).strip()
 
     return exts