mirror of
https://github.com/0x5eal/luau-unzip.git
synced 2025-04-10 17:20:53 +01:00
chore(lune): use proper markdown heading hierarchy in docsgen
This commit is contained in:
parent
fea6567014
commit
638c017f0a
1 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ local moonwave = require("./moonwave")
|
||||||
local logger = require("./log")
|
local logger = require("./log")
|
||||||
|
|
||||||
local function writeSectionHeader(buf: string, title: string)
|
local function writeSectionHeader(buf: string, title: string)
|
||||||
buf ..= `## {title}\n`
|
buf ..= `### {title}\n`
|
||||||
return buf
|
return buf
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ local function writeRef(buf: string, name: string, fragment: string?)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function writeClass(buf: string, name: string, desc: string)
|
local function writeClass(buf: string, name: string, desc: string)
|
||||||
buf ..= `# \`{name}\`\n`
|
buf ..= `## \`{name}\`\n`
|
||||||
buf ..= desc
|
buf ..= desc
|
||||||
buf ..= `\n\n`
|
buf ..= `\n\n`
|
||||||
return buf
|
return buf
|
||||||
|
@ -49,7 +49,7 @@ local function writeFunction(
|
||||||
)
|
)
|
||||||
local sep = if type == "method" then ":" else "."
|
local sep = if type == "method" then ":" else "."
|
||||||
local declaredSignature = `{class}{sep}{name}`
|
local declaredSignature = `{class}{sep}{name}`
|
||||||
buf ..= `### \`{name}\`\n`
|
buf ..= `#### \`{name}\`\n`
|
||||||
|
|
||||||
if private then
|
if private then
|
||||||
buf ..= `> [!IMPORTANT]\n`
|
buf ..= `> [!IMPORTANT]\n`
|
||||||
|
@ -148,7 +148,7 @@ local function writeMarkdown(path: string, items: { moonwave.Item })
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
|
||||||
buf ..= `### \`{type.name}\`\n`
|
buf ..= `#### \`{type.name}\`\n`
|
||||||
if type.private then
|
if type.private then
|
||||||
buf ..= `> [!IMPORTANT]\n`
|
buf ..= `> [!IMPORTANT]\n`
|
||||||
buf ..= `> This is a private type. It may be exported publicly, but try to avoid\n`
|
buf ..= `> This is a private type. It may be exported publicly, but try to avoid\n`
|
||||||
|
|
Loading…
Add table
Reference in a new issue