summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--library/src/meta/reference.rs2
-rw-r--r--src/eval/cast.rs2
-rw-r--r--src/eval/scope.rs2
-rw-r--r--src/syntax/parser.rs2
-rw-r--r--tests/typ/compiler/for.typ2
-rw-r--r--tests/typ/compiler/hint.typ11
6 files changed, 13 insertions, 8 deletions
diff --git a/library/src/meta/reference.rs b/library/src/meta/reference.rs
index 1d8bd118..5a295e33 100644
--- a/library/src/meta/reference.rs
+++ b/library/src/meta/reference.rs
@@ -180,7 +180,7 @@ impl Show for RefElem {
let numbering = refable
.numbering()
.ok_or_else(|| {
- eco_format!("cannot reference {} without numbering", elem.func().name())
+ eco_format!("cannot reference {0} without numbering - did you mean to use `#set {0}(numbering: \"1.\")`?", elem.func().name())
})
.at(span)?;
diff --git a/src/eval/cast.rs b/src/eval/cast.rs
index 29cf5f71..917972ed 100644
--- a/src/eval/cast.rs
+++ b/src/eval/cast.rs
@@ -242,7 +242,7 @@ impl CastInfo {
if parts.iter().any(|p| p == "length");
if !matching_type;
then {
- write!(msg, ": a length needs a unit – did you mean {i}pt?").unwrap();
+ write!(msg, ": a length needs a unit - did you mean {i}pt?").unwrap();
}
};
diff --git a/src/eval/scope.rs b/src/eval/scope.rs
index bc62feb1..f2aa26fb 100644
--- a/src/eval/scope.rs
+++ b/src/eval/scope.rs
@@ -72,7 +72,7 @@ impl<'a> Scopes<'a> {
#[cold]
fn unknown_variable(var: &str) -> EcoString {
if var.contains('-') {
- eco_format!("unknown variable: {} – if you meant to use subtraction, try adding spaces around the minus sign.", var)
+ eco_format!("unknown variable: {} - if you meant to use subtraction, try adding spaces around the minus sign.", var)
} else {
eco_format!("unknown variable: {}", var)
}
diff --git a/src/syntax/parser.rs b/src/syntax/parser.rs
index 05db42e1..5fc9ec26 100644
--- a/src/syntax/parser.rs
+++ b/src/syntax/parser.rs
@@ -1060,7 +1060,7 @@ fn for_loop(p: &mut Parser) {
p.assert(SyntaxKind::For);
pattern(p);
if p.at(SyntaxKind::Comma) {
- p.expected("keyword `in`. did you mean to use a destructuring pattern?");
+ p.expected("keyword `in` - did you mean to use a destructuring pattern?");
if !p.eat_if(SyntaxKind::Ident) {
p.eat_if(SyntaxKind::Underscore);
}
diff --git a/tests/typ/compiler/for.typ b/tests/typ/compiler/for.typ
index 72aaea20..7a0d9601 100644
--- a/tests/typ/compiler/for.typ
+++ b/tests/typ/compiler/for.typ
@@ -92,7 +92,7 @@
---
// Destructuring without parentheses.
-// Error: 7 expected keyword `in`. did you mean to use a destructuring pattern?
+// Error: 7 expected keyword `in` - did you mean to use a destructuring pattern?
#for k, v in (a: 4, b: 5) {
dont-care
}
diff --git a/tests/typ/compiler/hint.typ b/tests/typ/compiler/hint.typ
index 88135443..981c954f 100644
--- a/tests/typ/compiler/hint.typ
+++ b/tests/typ/compiler/hint.typ
@@ -2,7 +2,7 @@
// Ref: false
---
-// Error: 1:17-1:19 expected length, found integer: a length needs a unit – did you mean 12pt?
+// Error: 1:17-1:19 expected length, found integer: a length needs a unit - did you mean 12pt?
#set text(size: 12)
---
@@ -11,12 +11,17 @@
a = 1-a
a = a -1
- // Error: 7-10 unknown variable: a-1 – if you meant to use subtraction, try adding spaces around the minus sign.
+ // Error: 7-10 unknown variable: a-1 - if you meant to use subtraction, try adding spaces around the minus sign.
a = a-1
}
---
#{
- // Error: 3-6 unknown variable: a-1 – if you meant to use subtraction, try adding spaces around the minus sign.
+ // Error: 3-6 unknown variable: a-1 - if you meant to use subtraction, try adding spaces around the minus sign.
a-1 = 2
}
+
+---
+= Heading <intro>
+// Error: 1:20-1:26 cannot reference heading without numbering - did you mean to use `#set heading(numbering: "1.")`?
+Can not be used as @intro