bugGNU Octave - Bugs: bug #56320, [octave forge] (generate_html)...


bug #56320: [octave forge] (generate_html) literal '%' in 1st line produces failure

Submitter:  Juan Pablo Carbajal <juanpi>
Submitted:  Tue 14 May 2019 12:52:13 AM UTC
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Confirmed Assigned to:  None
Originator Name:  juanpi Open/Closed:  * Open
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Tue 14 May 2019 01:41:14 AM UTC, comment #1: 

>  This makes the package fails with matlab style docstrings.

Just a small correction, this bug has nothing to do with whether '#' or '%' comment markers are used for the doc string. This has to do with a literal '%' in the doc string text itself.

So this does not trigger this bug

function myfunc ()
%MYFUNC This is a simple function.
% This function does something.

But this does trigger this bug

function myfunc ()
%MYFUNC This is a 100% Simple function.
% This function does something.

specifically because '% S' is not a valid printf conversion specifier. If it was a lower-case 's' it would be interpreted as '% s', which is valid, but of course silently buggy in a different way.

Mike Miller <mtmiller>
Group Member
Tue 14 May 2019 12:52:13 AM UTC, original submission:  

This report is based on all the information provided by Mike Miller, thanks!

When the first help sentence of a function contains a literal '%' character, generate_html fails when parsing the docstring.

A simple test case would be

    ## -*- texinfo -*-
    ## @deftypefn {} {} myfunc
    ## This function is 10% ready.
    ## @end deftypefn
    function myfunc ()

This makes the package fails with matlab style docstrings.

Juan Pablo Carbajal <juanpi>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by juanpi (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-05-14 mtmiller StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-0159.
    Corresponding source code