SNRK-84: better

This commit is contained in:
Leonid Pereverzin 2023-05-07 17:57:41 +03:00
parent ffaa932127
commit 046bbda23a
2 changed files with 12 additions and 11 deletions

View File

@ -53,12 +53,10 @@ public data class IncludeDependency(
}
}
// parent - List<MdAstElement> --------------------------------------
// | \
// parent - List<MdAstElement> -------------------------------------
// | \
// \ \
// | \
// | \
// dependentNode - MdAstElement \
// |
// List<FileName> -> List<MdAstRoot> --> List<List<MdAstElement>> ===> List<MdAstElement>

View File

@ -6,15 +6,18 @@ import java.nio.file.Path
import java.nio.file.Paths
import kotlinx.html.*
import kotlinx.html.dom.createHTMLDocument
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import com.fasterxml.jackson.module.kotlin.readValue
private val DEFAULT_DOCUMENT_ROOT = "main.md"
public suspend fun buildDocument(documentDirectory: Directory): String {
val dependencyGraph = buildDependencyGraph(documentDirectory)
// TODO() /*resolving of dependencies*/
return "Not implemented"
println(1)
val roooot: MdAstRoot = dependencyGraph.nodes[""]!!.mdAst
println(2)
return jacksonObjectMapper().writeValueAsString(roooot)
// TODO прикрутить html
}
public suspend fun buildDependencyGraph(root: Directory): DependencyGraph {