changeset 22884:0419dec5d5c1 stable

allow external docstrings from .oct files to be found again (bug #49687) * help.cc (raw_help): Handle "external-doc" again, in addition to "external-doc:NAME".
author John W. Eaton <jwe@octave.org>
date Tue, 13 Dec 2016 09:58:44 -0500
parents 194481349d22
children 0918e3b4f740 b3f5fe7e6f75
files libinterp/corefcn/help.cc
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/help.cc	Sat Dec 10 11:35:23 2016 -0500
+++ b/libinterp/corefcn/help.cc	Tue Dec 13 09:58:44 2016 -0500
@@ -485,11 +485,17 @@
   if (! found)
     found = raw_help_from_file (nm, h, f, symbol_found);
 
-  bool external_doc = h.compare (0, 13, "external-doc:") == 0;
+  bool external_doc = h.compare (0, 12, "external-doc") == 0;
 
   if (! found || external_doc)
-    raw_help_from_docstrings_file (external_doc ? h.substr (13) : nm,
-                                   h, symbol_found);
+    {
+      std::string tmp_nm = nm;
+
+      if (external_doc && h.length () > 12 && h[12] == ':')
+        tmp_nm = h.substr (13);
+
+      raw_help_from_docstrings_file (tmp_nm, h, symbol_found);
+    }
 
   return h;
 }