mirror of
https://github.com/TxtDot/dalet-rs.git
synced 2024-12-25 01:53:46 +03:00
fix: formatting
This commit is contained in:
parent
947c2e123b
commit
66abb7e149
3 changed files with 6 additions and 4 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -201,7 +201,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dalet"
|
name = "dalet"
|
||||||
version = "1.0.0-pre.17"
|
version = "1.0.0-pre.18"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ariadne",
|
"ariadne",
|
||||||
"bincode",
|
"bincode",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "dalet"
|
name = "dalet"
|
||||||
version = "1.0.0-pre.17"
|
version = "1.0.0-pre.18"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["artegoser"]
|
authors = ["artegoser"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
@ -150,12 +150,14 @@ pub fn format<'src>(spanned_tokens: &Vec<Spanned<Token<'src>>>) -> String {
|
||||||
format!("{}\n", prepend_indent("]]", current_indent))
|
format!("{}\n", prepend_indent("]]", current_indent))
|
||||||
}
|
}
|
||||||
Token::Paragraph(t) => format!(
|
Token::Paragraph(t) => format!(
|
||||||
"{{-\n{}\n{}\n",
|
"{}\n{}\n{}\n",
|
||||||
|
prepend_indent("{-", current_indent),
|
||||||
set_indent(t, current_indent + 1),
|
set_indent(t, current_indent + 1),
|
||||||
prepend_indent("}", current_indent)
|
prepend_indent("}", current_indent)
|
||||||
),
|
),
|
||||||
Token::TableSyntax(rows) => format!(
|
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),
|
set_indent(&table_to_string(rows), current_indent + 1),
|
||||||
prepend_indent("}", current_indent)
|
prepend_indent("}", current_indent)
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue