SNRK-71: parseMd is implemented
This commit is contained in:
parent
248677dad9
commit
e0ef373c48
@ -1,7 +1,16 @@
|
||||
package documentBuilder
|
||||
|
||||
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
|
||||
import com.fasterxml.jackson.module.kotlin.readValue
|
||||
|
||||
private val MARKDOWN_PARSER = "../nodejs/MarkdownParser.js"
|
||||
|
||||
public suspend fun parseMd(mdFile: ByteArray): MdAstRoot {
|
||||
TODO()
|
||||
return jacksonObjectMapper()
|
||||
.readValue<MdAstRoot>(ProcessBuilder("node", MARKDOWN_PARSER, mdFile.toString())
|
||||
.redirectOutput(ProcessBuilder.Redirect.PIPE)
|
||||
.redirectError(ProcessBuilder.Redirect.INHERIT)
|
||||
.start().inputStream.bufferedReader().readText())
|
||||
}
|
||||
|
||||
public suspend fun buildDependencyGraphNode(mdFile: ByteArray): DependencyGraphNode {
|
||||
|
Loading…
Reference in New Issue
Block a user