ldoc.readme can be multiple; ldoc.topics is a synonym.

This commit is contained in:
steve donovan 2012-03-04 18:42:50 +02:00
parent 38c8f187b3
commit 6c3c19f3bf
1 changed files with 14 additions and 8 deletions

View File

@ -394,15 +394,21 @@ if type(ldoc.examples) == 'table' then
end)
end
ldoc.readme = ldoc.readme or ldoc.topics
if type(ldoc.readme) == 'string' then
local item, F = add_special_project_entity(ldoc.readme,{
ldoc.readme = {ldoc.readme}
end
if type(ldoc.readme) == 'table' then
process_file_list(ldoc.readme, '*.md', function(f)
local item, F = add_special_project_entity(f,{
class = 'topic'
}, markup.add_sections)
-- add_sections above has created sections corresponding to the 2nd level
-- headers in the readme, which are attached to the File. So
-- we pass the File to the postprocesser can insert the section markers
-- we pass the File to the postprocesser, which will insert the section markers
-- and resolve inline @ references.
item.postprocess = function(txt) return ldoc.markup(txt,F) end
end)
end
-- extract modules from the file objects, resolve references and sort appropriately ---