Mercurial > octave
comparison libinterp/parse-tree/lex.ll @ 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 | 21f9b34eb893 |
children | 592adc6b8901 |
comparison
equal
deleted
inserted
replaced
32100:10daf5ce7f28 | 32101:aaaee134c8df |
---|---|
3317 void | 3317 void |
3318 base_lexer::finish_comment (comment_elt::comment_type typ) | 3318 base_lexer::finish_comment (comment_elt::comment_type typ) |
3319 { | 3319 { |
3320 bool copyright = looks_like_copyright (m_comment_text); | 3320 bool copyright = looks_like_copyright (m_comment_text); |
3321 | 3321 |
3322 if (m_nesting_level.none () && m_help_text.empty () && ! m_comment_text.empty () | 3322 if (typ != octave::comment_elt::end_of_line |
3323 && m_nesting_level.none () | |
3324 && m_help_text.empty () && ! m_comment_text.empty () | |
3323 && ! copyright && ! looks_like_shebang (m_comment_text)) | 3325 && ! copyright && ! looks_like_shebang (m_comment_text)) |
3324 m_help_text = m_comment_text; | 3326 m_help_text = m_comment_text; |
3325 | 3327 |
3326 if (copyright) | 3328 if (copyright) |
3327 typ = comment_elt::copyright; | 3329 typ = comment_elt::copyright; |