Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

fix: made Typst examples output exact same thing

Andrew Voynovc405c3f7896d
diff --git a/harper-typst/tests/test_sources/complex_document.typ b/harper-typst/tests/test_sources/complex_document.typ
index 1a6c65c54..fcd3910a2 100644
--- a/harper-typst/tests/test_sources/complex_document.typ
+++ b/harper-typst/tests/test_sources/complex_document.typ
@@ -7,7 +7,10 @@
title: "Default Title",
authors: ("Author 1", "Author 2"),
abstract: [*This is content*],
+ body,
) = {
+ set document(date: none)
+ set par(justify: true)
set page(
header: context {
if counter(page).get().first() > 1 [
@@ -45,15 +48,16 @@
#abstract
]
]
+ body
}
#show: doc => [
#titleblock(
title: "A fluid dynamic model for glacier flow",
authors: ("Grant Lemons", "John Doe", "Jane Doe"),
- abstract: lorem(80)
+ abstract: lorem(80),
+ doc,
)
- #doc
]
= Introduction
diff --git a/harper-typst/tests/test_sources/complex_with_spelling_mistakes.typ b/harper-typst/tests/test_sources/complex_with_spelling_mistakes.typ
index 6e65b73fe..47d0bbf16 100644
--- a/harper-typst/tests/test_sources/complex_with_spelling_mistakes.typ
+++ b/harper-typst/tests/test_sources/complex_with_spelling_mistakes.typ
@@ -7,7 +7,10 @@
title: "Defalt Title",
authors: ("Author 1", "Author 2"),
abstract: [*This is contnt*],
+ body,
) = {
+ set document(date: none)
+ set par(justify: true)
set page(
header: context {
if counter(page).get().first() > 1 [
@@ -45,15 +48,16 @@
#abstract
]
]
+ body
}
#show: doc => [
#titleblock(
title: "A fluid dynamic model for glaier flow",
authors: ("Grant Lemons", "John Doe", "Jane Doe"),
- abstract: lorem(80)
+ abstract: lorem(80),
+ doc,
)
- #doc
]
= Introduction
diff --git a/harper-typst/tests/test_sources/simplified_document.typ b/harper-typst/tests/test_sources/simplified_document.typ
index cd22f9be2..60bbeb566 100644
--- a/harper-typst/tests/test_sources/simplified_document.typ
+++ b/harper-typst/tests/test_sources/simplified_document.typ
@@ -4,6 +4,7 @@
abstract: [*This is content*],
body,
) = {
+ set document(date: none)
set par(justify: true)
set page(
paper: "us-letter",
@@ -20,8 +21,7 @@
scope: "parent",
clearance: 2em,
)[
- #show heading: set text(17pt)
- = #title
+ #text(17pt, strong(title))
#let authors-line = if authors.len() > 3 {
// "et al." isn't parsed properly, but this isn't the fault of the Typst