refactor: rename DTree to DValue

This commit is contained in:
udo
2026-06-12 11:05:52 +00:00
parent 941f5aea08
commit 7066da3cde
157 changed files with 1203 additions and 1074 deletions
+7 -7
View File
@@ -1,21 +1,21 @@
:sig
DTree markdown_to_ast(String src)
DTree markdown_to_ast(String src, DTree options)
DValue markdown_to_ast(String src)
DValue markdown_to_ast(String src, DValue options)
:params
src : markdown source text
options : optional markdown options tree
return value : a `DTree` document AST
return value : a `DValue` document AST
:see
markdown_to_html
component
component_render
json_encode
0_DTree
0_DValue
:content
Parses Markdown source into a structured `DTree` document tree.
Parses Markdown source into a structured `DValue` document tree.
The parser targets a practical GitHub-flavored subset by default:
@@ -67,8 +67,8 @@ Common inline nodes:
Example:
```uce
DTree options = json_decode("{\"components\":{\":::warning\":\"components/markdown/warning\"}}");
DTree ast = markdown_to_ast(file_get_contents("README.md"), options);
DValue options = json_decode("{\"components\":{\":::warning\":\"components/markdown/warning\"}}");
DValue ast = markdown_to_ast(file_get_contents("README.md"), options);
print(json_encode(ast));
```