Skip to content

Commit

Permalink
feat: use Unicode Standard Annex #11 rules for line width calculation (
Browse files Browse the repository at this point in the history
  • Loading branch information
dsherret authored Dec 7, 2022
1 parent 8eecd9c commit f2665fa
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 19 deletions.
37 changes: 19 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tracing = ["dprint-core/tracing"]

[dependencies]
anyhow = "1.0.64"
dprint-core = { version = "0.59.0", features = ["formatting"] }
dprint-core = { version = "0.60.0", features = ["formatting"] }
jsonc-parser = { version = "0.21.0" }
serde = { version = "1.0.144", features = ["derive"] }
serde_json = { version = "1.0", optional = true }
Expand Down
15 changes: 15 additions & 0 deletions tests/specs/strings/Strings_All.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
~~ lineWidth: 80 ~~
== should support single quote strings ==
'te\'st'

Expand All @@ -15,3 +16,17 @@

[expect]
"asdf\tasdf\f\b\u0020\r\n\r\r"

== should use unicode standard annex #11 rules for line width ==
{
"a": ["대충 한국어로 아무 말이나 적고 있습니다. '아무말'은 표준국어대사전에"],
"b": ["대충 한국어로 아무 말이나 적고 있습니다. '아무말'은 표준국어대사전에 "]
}

[expect]
{
"a": ["대충 한국어로 아무 말이나 적고 있습니다. '아무말'은 표준국어대사전에"],
"b": [
"대충 한국어로 아무 말이나 적고 있습니다. '아무말'은 표준국어대사전에 "
]
}

0 comments on commit f2665fa

Please sign in to comment.