SNRK-89: first buld document

This commit is contained in:
Leonid Pereverzin 2023-05-18 15:56:17 +03:00
parent 9031638910
commit 7c5e2b7dbb

View File

@ -25,7 +25,15 @@ private val DEFAULT_DOCUMENT_ROOT = "main.md"
public suspend fun buildDocument(root: Directory, path: Path): String { public suspend fun buildDocument(root: Directory, path: Path): String {
val dependencyGraph = buildDependencyGraph(root, path) val dependencyGraph = buildDependencyGraph(root, path)
println("dependency graph nodes (size: ${dependencyGraph.nodes.size}):\n${dependencyGraph.nodes}") val graphManage = GraphManager(dependencyGraph)
graphManage.buildDocument(path.toString())
// for ((key, value) in dependencyGraph.nodes) {
// println("Key ${key}")
// println("Value.mdAst ${value.mdAst}")
// println("Value.dependencies ${value.dependencies}")
// }
val root: MdAstRoot = dependencyGraph.nodes[path.toString()]!!.mdAst val root: MdAstRoot = dependencyGraph.nodes[path.toString()]!!.mdAst