lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


The problem goes away if you include a description for the function, either on the same line as the luadoc comment marker (three dashes), or on subsequent lines.

This might be considered a bug with luadoc, but it is probably not important to fix: it would be poor form to have a function without a description.

Stephen


On 23 December 2015 at 11:08, TW <zupftom@googlemail.com> wrote:
Hi all,

I have a problem with LDoc.  I have a module like this:



---
-- Some module
-- @module test


return {
    --- 
    -- @function f1
    -- @treturn string
    --   some string
    f1 = function()
        return "some string"
    end,
    
    --- 
    -- @function f2
    -- @treturn string 
    --   some other string
    f2 = function f2()
        return "some other string"
    end
}



LDoc revision aa4cd9d generates this (original HTML attached):



Module test

Some module

Functions

f1 ()
f2 ()


Functions

f1 ()

Returns:

  1. string some string
  2. string some other string
f2 ()

Returns:

    string some other string



I.e. the return type of f2() falsely also appears for f1().  Can anyone tell me if I'm doing something wrong or whether LDoc has an issue here?

Thanks
Thomas W.