diff --git a/snark-document-builder/src/main/kotlin/DependencyGraph.kt b/snark-document-builder/src/main/kotlin/DependencyGraph.kt index 0737713..2928cf7 100644 --- a/snark-document-builder/src/main/kotlin/DependencyGraph.kt +++ b/snark-document-builder/src/main/kotlin/DependencyGraph.kt @@ -53,14 +53,12 @@ public data class IncludeDependency( } } -// parent - List -------------------------------------- +// parent - List ------------------------------------- // | \ -// | \ -// \ \ -// | \ -// | \ -// dependentNode - MdAstElement \ -// | +// \ \ +// | \ +// dependentNode - MdAstElement \ +// | // List -> List --> List> ===> List /** diff --git a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt index 5f1ff31..c555c85 100644 --- a/snark-document-builder/src/main/kotlin/DocumentBuilder.kt +++ b/snark-document-builder/src/main/kotlin/DocumentBuilder.kt @@ -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 {