|
From: | Rik |
Subject: | Re: first help sentence truncated |
Date: | Mon, 27 Aug 2018 10:11:10 -0700 |
This is likely to be caused by
get_first_help_sentence.m in Octave core.
With the following file b.m --- File: b.m --- ## This plots x vs. y on a green background. function b (x) disp ('hello'); endfunction --- End File --- get_first_help_sentence ("b.m") returns ans = This plots x vs. The code is ## Extract first line by searching for a period followed by a space class ## character (to support periods in numbers or words) ... period_idx = regexp (help_text, '\.\s', "once"); One way to resolve this is to have a list of abbreviations as Oliver suggests. This could get cumbersome though as we would probably not recognize a new abbreviation in the first sentence of help until somebody reported an error. Another solution would be to require the convention (used in Octave core) that a sentence-ending period is followed by *two* spaces. Then the regular _expression_ above could be modified to support this case. This would work on all in-sentence abbreviations, and on phrases like "Plot Y vs. X on a semilog background. The second help sentence". A third possibility would be to re-write the documentation--either to expand the abbreviation like vs. to versus if length is not a problem, or to remove the abbreviation entirely. For example, the existing semilogy documentation avoids using "vs." entirely and says "Produce a 2-D plot using a logarithmic scale for the y-axis." --Rik On 08/27/2018 09:00 AM, address@hidden wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |