Mercurial > octave
changeset 24002:94cbb6dd7b21
Fix doc() in GUI to work on multi-word seach terms (bug #44202).
* parser.cc: (parser::find_ref): Remove spaces from search term as XREF entries
are run together with no whitespace.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 04 Sep 2017 21:12:33 -0700 |
parents | 8e4abfaadd97 |
children | 6bba9e4a1e8d |
files | libgui/src/qtinfo/parser.cc |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/qtinfo/parser.cc Mon Sep 04 13:55:14 2017 -0400 +++ b/libgui/src/qtinfo/parser.cc Mon Sep 04 21:12:33 2017 -0700 @@ -647,6 +647,8 @@ QString parser::find_ref (const QString& ref_name) { + QString ref_nm = ref_name; + ref_nm.remove (' '); // Delete spaces as XREF uses no whitespace QString text = ""; QHash<QString, node_position>::iterator it; @@ -655,10 +657,10 @@ QString k = it.key (); node_position p = it.value (); - if (k == "XREF" + ref_name) + if (k == "XREF" + ref_nm) { // found ref, so return its name - text = "XREF" + ref_name; + text = "XREF" + ref_nm; break; } }