Skip to content

Commit

Permalink
add toc
Browse files Browse the repository at this point in the history
  • Loading branch information
molarmanful committed Aug 20, 2023
1 parent d31e2c8 commit 13acd29
Show file tree
Hide file tree
Showing 2 changed files with 377 additions and 206 deletions.
11 changes: 9 additions & 2 deletions docp.sc
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,18 @@ case class DocParser(
}
}

def md: String = s"""
def md: String = {
val cs1 = cs.map { case (a, b) => (b, a) }
s"""
# COMMANDS

${xs.map(_.md(cs.map { case (a, b) => (b, a) })).mkString("\n")}
${xs.map { case DocCmd(name, _, _) => s"[``` $name ```](#${cs1(name)})" }
.mkString(",\n")}


${xs.map(_.md(cs1)).mkString("\n")}
"""
}

}

Expand Down
Loading

0 comments on commit 13acd29

Please sign in to comment.