changeset 22885:0918e3b4f740

maint: Periodic merge of stable to default.
author John W. Eaton <jwe@octave.org>
date Tue, 13 Dec 2016 09:59:53 -0500
parents 7cf0b9654d44 (current diff) 0419dec5d5c1 (diff)
children 5ede69715ebe
files libinterp/corefcn/help.cc
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/help.cc	Mon Dec 12 16:48:24 2016 -0500
+++ b/libinterp/corefcn/help.cc	Tue Dec 13 09:59:53 2016 -0500
@@ -483,11 +483,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;
 }