diff --git a/changes.md b/changes.md index a96b72c5..de3a8f82 100644 --- a/changes.md +++ b/changes.md @@ -1,3 +1,13 @@ +## Version 1.4.6-u_dev +This version is a fork of Steve Donovan's LDoc that: + +- Fixes [issue 301](https://github.com/stevedonovan/LDoc/issues/301 "Source code links wiht add_language_extension() are incorrect.") +- Adds the following tags: + - **@contributor** Someone's Name + - **@curator** SomeOne's Name + +Both of the above tags are processed similar to the **@author** tag + ## Version 1.4.4 ### Features diff --git a/ldoc.lua b/ldoc.lua index 4cb99663..ec3e0247 100644 --- a/ldoc.lua +++ b/ldoc.lua @@ -30,7 +30,7 @@ utils.unpack = utils.unpack or unpack or table.unpack local append = table.insert local lapp = require 'pl.lapp' -local version = '1.4.6' +local version = '1.4.6-u_dev' -- so we can find our private modules app.require_here() @@ -571,6 +571,7 @@ if ldoc.prettify_files then local files = List() local linemap = {} for F in file_list:iter() do + print("Pretty Print file: ", F.filename) files:append(F.filename) local mod = F.modules[1] local ls = List() diff --git a/ldoc/doc.lua b/ldoc/doc.lua index 97e1ff42..75920b57 100644 --- a/ldoc/doc.lua +++ b/ldoc/doc.lua @@ -23,7 +23,7 @@ local TAG_MULTI,TAG_ID,TAG_SINGLE,TAG_TYPE,TAG_FLAG,TAG_MULTI_LINE = 'M','id','S -- - 'N' tags which have no associated value, like 'local` (TAG_FLAG) -- - 'T' tags which represent a type, like 'function' (TAG_TYPE) local known_tags = { - param = 'M', see = 'M', comment = 'M', usage = 'ML', ['return'] = 'M', field = 'M', author='M',set='M'; + param = 'M', see = 'M', comment = 'M', usage = 'ML', ['return'] = 'M', field = 'M', author='M', curator='M', contributor='M', set='M'; class = 'id', name = 'id', pragma = 'id', alias = 'id', copyright = 'S', summary = 'S', description = 'S', release = 'S', license = 'S', fixme = 'S', todo = 'S', warning = 'S', raise = 'S', charset = 'S', within = 'S', @@ -57,7 +57,7 @@ known_tags._presentation_names = { } known_tags._module_info = { - 'copyright','release','license','author' + 'copyright','release','license','author', 'curator', 'contributor' } local see_reference_handlers = {} @@ -458,7 +458,7 @@ end function Item:trailing_warning (kind,tag,rest) if type(rest)=='string' and #rest > 0 then - Item.warning(self,kind.." tag: '"..tag..'" has trailing text ; use not_luadoc=true if you want description to continue between tags\n"'..rest..'"') + Item.warning(self,kind.." tag: '"..tag.."' has trailing text ; use not_luadoc=true if you want description to continue between tags\n'"..rest.."'") end end diff --git a/ldoc/html.lua b/ldoc/html.lua index d1eb8885..41cc3208 100644 --- a/ldoc/html.lua +++ b/ldoc/html.lua @@ -152,7 +152,7 @@ function html.generate_output(ldoc, args, project) end return base..name..'.html' end - + function ldoc.include_file (file) local text,e = utils.readfile(file) if not text then quit("unable to include "..file) @@ -161,14 +161,16 @@ function html.generate_output(ldoc, args, project) end end --- these references are never from the index...? -function ldoc.source_ref (fun) + -- these references are never from the index...? + function ldoc.source_ref (fun) local modname = fun.module.name + local path, ext + path, ext = tools.split_dotted_name(fun.module.file.filename) local pack,name = tools.split_dotted_name(modname) if not pack then name = modname end - return (ldoc.single and "" or "../").."source/"..name..'.lua.html#'..fun.lineno + return (ldoc.single and "" or "../").."source/"..name..'.'..ext..'.html#'..fun.lineno end function ldoc.use_li(ls) @@ -212,7 +214,7 @@ function ldoc.source_ref (fun) function ldoc.is_list (t) return type(t) == 'table' and t.append end - + function ldoc.strip_header (s) if not s then return s end return s:gsub('^%s*#+%s+','') diff --git a/ldoc/html/ldoc_css.lua b/ldoc/html/ldoc_css.lua index 1be506f6..324c3b8c 100644 --- a/ldoc/html/ldoc_css.lua +++ b/ldoc/html/ldoc_css.lua @@ -125,7 +125,7 @@ table.index td { text-align: left; vertical-align: top; } #content { margin-left: 14em; padding: 1em; - width: 700px; + width: 800px; border-left: 2px solid #cccccc; border-right: 2px solid #cccccc; background-color: #ffffff; diff --git a/ldoc/html/ldoc_fixed_css.lua b/ldoc/html/ldoc_fixed_css.lua index 98187c79..a87e0d35 100644 --- a/ldoc/html/ldoc_fixed_css.lua +++ b/ldoc/html/ldoc_fixed_css.lua @@ -132,7 +132,7 @@ table.index td { text-align: left; vertical-align: top; } margin-left: 14em; padding: 1em; padding-left: 2em; - width: 700px; + width: 800px; border-left: 2px solid #cccccc; // border-right: 2px solid #cccccc; background-color: #ffffff; diff --git a/ldoc/html/ldoc_ltp.lua b/ldoc/html/ldoc_ltp.lua index 4827e619..9371350a 100644 --- a/ldoc/html/ldoc_ltp.lua +++ b/ldoc/html/ldoc_ltp.lua @@ -306,7 +306,7 @@ return [==[
-generated by LDoc $(ldoc.version) +generated by LDoc $(ldoc.version) Last updated $(ldoc.updatetime)
diff --git a/ldoc/html/ldoc_pale_css.lua b/ldoc/html/ldoc_pale_css.lua index ffc91a28..56452fd7 100644 --- a/ldoc/html/ldoc_pale_css.lua +++ b/ldoc/html/ldoc_pale_css.lua @@ -126,7 +126,7 @@ table.index td { text-align: left; vertical-align: top; } #content { margin-left: 14em; padding: 1em; - width: 700px; + width: 800px; border-left: 2px solid #cccccc; // border-right: 2px solid #cccccc; background-color: #ffffff; diff --git a/readme.md b/readme.md index 35e9c2b5..32201fcf 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,13 @@ Copyright (C) 2011-2012 Steve Donovan. +## Fork of Steve Donovan's LDoc that fixes issue 301 and adds the following tags: + +- **@contributor** Someone's Name +- **@curator** SomeOne's Name + +Both of the above tags are processed similar to the **@author** tag + ## Rationale This project grew out of the documentation needs of