diff options
author | 2020-09-13 18:20:00 -0400 | |
---|---|---|
committer | 2020-09-13 18:20:00 -0400 | |
commit | c436febaf7f7b7605bf61777931e97831d956d83 (patch) | |
tree | 4cfdb384668a0275b42e245eba8c05fa6c40f8cf /docs/markdowndoc.lua | |
parent | 75041aa1e1651841073473399397bcbfc10b0134 (diff) | |
download | textadept-c436febaf7f7b7605bf61777931e97831d956d83.tar.gz textadept-c436febaf7f7b7605bf61777931e97831d956d83.zip |
Lots of documentation updates.
Updated header id generation, anchors, links, and header levels.
Added dedicated book page and support data.
Removed extra module autocompletion and documentation from Lua module.
Removed GPG signing and verification, as everything is built and distributed on
GitHub.
Removed all release links prior to 10.8 since there is no point in uploading
the relevant files to GitHub.
Diffstat (limited to 'docs/markdowndoc.lua')
-rw-r--r-- | docs/markdowndoc.lua | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/docs/markdowndoc.lua b/docs/markdowndoc.lua index 35d161a3..f443fe73 100644 --- a/docs/markdowndoc.lua +++ b/docs/markdowndoc.lua @@ -5,7 +5,7 @@ local M = {} local TOC = '1. [%s](%s)\n' -local MODULE = '<a id="%s"></a>\n## The `%s` Module\n\n' +local MODULE = '<a id="%s"></a>\n## The `%s` Module\n' local FIELD = '<a id="%s"></a>\n#### `%s` %s\n\n' local FUNCTION = '<a id="%s"></a>\n#### `%s`(*%s*)\n\n' local FUNCTION_NO_PARAMS = '<a id="%s"></a>\n#### `%s`()\n\n' @@ -28,13 +28,6 @@ local titles = { -- @param name The name of the module the description belongs to. Used for -- headers in module descriptions. local function write_description(f, description, name) - if name then - -- Add anchors for module description headers. - description = description:gsub('\n(#+%s+([^\n]+))', function(header, text) - return string.format( - '\n\n<a id="%s.%s"></a>\n\n%s', name, text:gsub('[%s%p]', '.'), header) - end) - end -- Substitute custom [`code`]() link convention with [`code`](#code) links. local self_link = '(%[`([^`(]+)%(?%)?`%])%(%)' description = description:gsub(self_link, function(link, id) @@ -104,7 +97,7 @@ function M.start(doc) -- Write the header and description. f:write(string.format(MODULE, name, name)) - f:write('- - -\n\n') + f:write('---\n\n') write_description(f, module.description, name) -- Write fields. @@ -170,7 +163,7 @@ function M.start(doc) write_list(f, SEE, tbl.see, name) end end - f:write('- - -\n\n') + f:write('---\n') end end |