changeset 32101:aaaee134c8df

Identify only full-line or block comments as help text (bug #64065) * lex.ll (base_lexer::finish_comment): Check that type of comment is not "end_of_line" before considering it for possible help text.
author Rik <rik@octave.org>
date Tue, 30 May 2023 20:52:07 -0700
parents 10daf5ce7f28
children 8b795293c050
files libinterp/parse-tree/lex.ll
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/lex.ll	Tue May 30 17:04:52 2023 -0700
+++ b/libinterp/parse-tree/lex.ll	Tue May 30 20:52:07 2023 -0700
@@ -3319,7 +3319,9 @@
   {
     bool copyright = looks_like_copyright (m_comment_text);
 
-    if (m_nesting_level.none () && m_help_text.empty () && ! m_comment_text.empty ()
+    if (typ != octave::comment_elt::end_of_line
+        && m_nesting_level.none ()
+        && m_help_text.empty () && ! m_comment_text.empty ()
         && ! copyright && ! looks_like_shebang (m_comment_text))
       m_help_text = m_comment_text;