|
@@ -36,6 +36,7 @@ func ParseJSONWithoutFix(jsonData []byte, options *parse.Options) (ret *parse.Tr
|
|
|
|
|
|
ret = &parse.Tree{Name: "", ID: root.ID, Root: &ast.Node{Type: ast.NodeDocument, ID: root.ID, Spec: root.Spec}, Context: &parse.Context{ParseOption: options}}
|
|
ret = &parse.Tree{Name: "", ID: root.ID, Root: &ast.Node{Type: ast.NodeDocument, ID: root.ID, Spec: root.Spec}, Context: &parse.Context{ParseOption: options}}
|
|
ret.Root.KramdownIAL = parse.Map2IAL(root.Properties)
|
|
ret.Root.KramdownIAL = parse.Map2IAL(root.Properties)
|
|
|
|
+ ret.Root.SetIALAttr("type", "doc")
|
|
ret.Context.Tip = ret.Root
|
|
ret.Context.Tip = ret.Root
|
|
if nil == root.Children {
|
|
if nil == root.Children {
|
|
return
|
|
return
|
|
@@ -57,6 +58,7 @@ func ParseJSON(jsonData []byte, options *parse.Options) (ret *parse.Tree, needFi
|
|
|
|
|
|
ret = &parse.Tree{Name: "", ID: root.ID, Root: &ast.Node{Type: ast.NodeDocument, ID: root.ID, Spec: root.Spec}, Context: &parse.Context{ParseOption: options}}
|
|
ret = &parse.Tree{Name: "", ID: root.ID, Root: &ast.Node{Type: ast.NodeDocument, ID: root.ID, Spec: root.Spec}, Context: &parse.Context{ParseOption: options}}
|
|
ret.Root.KramdownIAL = parse.Map2IAL(root.Properties)
|
|
ret.Root.KramdownIAL = parse.Map2IAL(root.Properties)
|
|
|
|
+ ret.Root.SetIALAttr("type", "doc")
|
|
for _, kv := range ret.Root.KramdownIAL {
|
|
for _, kv := range ret.Root.KramdownIAL {
|
|
if strings.Contains(kv[1], "\n") {
|
|
if strings.Contains(kv[1], "\n") {
|
|
val := kv[1]
|
|
val := kv[1]
|