From 66abb7e1496ed8672de24e22232f60eb0ae8a3da Mon Sep 17 00:00:00 2001 From: Artemy Egorov Date: Wed, 14 Aug 2024 18:26:11 +0300 Subject: [PATCH] fix: formatting --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/daleth/format.rs | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 12e5dbd..b94a215 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -201,7 +201,7 @@ dependencies = [ [[package]] name = "dalet" -version = "1.0.0-pre.17" +version = "1.0.0-pre.18" dependencies = [ "ariadne", "bincode", diff --git a/Cargo.toml b/Cargo.toml index 97c5abb..db94a98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dalet" -version = "1.0.0-pre.17" +version = "1.0.0-pre.18" edition = "2021" authors = ["artegoser"] license = "MIT" diff --git a/src/daleth/format.rs b/src/daleth/format.rs index b7acb9b..41af3d6 100644 --- a/src/daleth/format.rs +++ b/src/daleth/format.rs @@ -150,12 +150,14 @@ pub fn format<'src>(spanned_tokens: &Vec>>) -> String { format!("{}\n", prepend_indent("]]", current_indent)) } Token::Paragraph(t) => format!( - "{{-\n{}\n{}\n", + "{}\n{}\n{}\n", + prepend_indent("{-", current_indent), set_indent(t, current_indent + 1), prepend_indent("}", current_indent) ), Token::TableSyntax(rows) => format!( - "{{> table\n{}\n{}\n", + "{}\n{}\n{}\n", + prepend_indent("{{> table", current_indent), set_indent(&table_to_string(rows), current_indent + 1), prepend_indent("}", current_indent) ),