views:

30

answers:

1

I am currently developing lua scripts for a new application which requires the extension to be xx_lua. I have luadoc working fine for .lua extensions and I know I could simply rename the files to the lua extension create the documents and rename them back, but personally I would prefer a more elegant solution.

Is is possible to get luadoc to look at other extensions.

I have tried calling luadoc_start *.xx_lua

but that results with no output even when there are plenty of files in the path with that extension.

+1  A: 

If modifying luadoc is an option then you can do that. I just had a quick look at the 3.0.1 version (latest at the moment of writing this) and in src/luadoc/taglet/standard.lua there's line 406:

local patterns = { "%.lua$", "%.luadoc$" }

The pattern "%.lua" is used at two other locations (same file, line 316) and in src/luadoc/doclet/html.lua:53, that last one doesn't seem relevant. The right thing to do in my opinion would be to create a global parameter for filename extension and use it instead of the hardcoded ".lua". Maybe you can even submit a patch to luadoc and improve it for future programmers in your situation :)

sbk
Thanks exactly what I needed.
Jane T