Markdown: increase list vertical spacing

This commit is contained in:
MM20 2023-04-26 21:48:26 +02:00
parent 624a6a6d2e
commit 10d4b02798
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -142,6 +142,7 @@ fun ParagraphNode(node: ASTNode, text: String) {
@Composable @Composable
fun UnorderedListNode(node: ASTNode, text: String, onTextChange: (String) -> Unit) { fun UnorderedListNode(node: ASTNode, text: String, onTextChange: (String) -> Unit) {
Column(modifier = Modifier.padding(vertical = 4.dp)) {
var counter = 1 var counter = 1
for (child in node.children) { for (child in node.children) {
if (child.type == MarkdownElementTypes.LIST_ITEM) { if (child.type == MarkdownElementTypes.LIST_ITEM) {
@ -149,10 +150,12 @@ fun UnorderedListNode(node: ASTNode, text: String, onTextChange: (String) -> Uni
counter++ counter++
} }
} }
}
} }
@Composable @Composable
fun OrderedListNode(node: ASTNode, text: String, onTextChange: (String) -> Unit) { fun OrderedListNode(node: ASTNode, text: String, onTextChange: (String) -> Unit) {
Column(modifier = Modifier.padding(vertical = 4.dp)) {
var counter = 1 var counter = 1
for (child in node.children) { for (child in node.children) {
if (child.type == MarkdownElementTypes.LIST_ITEM) { if (child.type == MarkdownElementTypes.LIST_ITEM) {
@ -160,6 +163,7 @@ fun OrderedListNode(node: ASTNode, text: String, onTextChange: (String) -> Unit)
counter++ counter++
} }
} }
}
} }
@Composable @Composable