Skip to content

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

fix spacing

aminwhat8a8182210b96
diff --git a/packages/web/src/routes/docs/harperjs/introduction/+page.md b/packages/web/src/routes/docs/harperjs/introduction/+page.md
index c128f95d2..32c74252c 100644
--- a/packages/web/src/routes/docs/harperjs/introduction/+page.md
+++ b/packages/web/src/routes/docs/harperjs/introduction/+page.md
@@ -25,31 +25,32 @@ It can be imported [natively in a browser](./CDN) or through [npm](https://www.n
## Sample Usage:
```js
-let harper = require('harper.js');
+
+let harper = require("harper.js");
async function main() {
- // We cannot use `WorkerLinter` on Node.js since it relies on web-specific APIs.
- let linter = new harper.LocalLinter();
+ // We cannot use `WorkerLinter` on Node.js since it relies on web-specific APIs.
+ let linter = new harper.LocalLinter();
- let lints = await linter.lint('This is a example of how to use `harper.js`.');
+ let lints = await linter.lint("This is a example of how to use `harper.js`.");
- console.log('Here are the results of linting the above text:');
+ console.log("Here are the results of linting the above text:");
- for (let lint of lints) {
- console.log(' - ', lint.span().start, ':', lint.span().end, lint.message());
+ for (let lint of lints) {
+ console.log(" - ", lint.span().start, ":", lint.span().end, lint.message());
- if (lint.suggestion_count() != 0) {
- console.log('Suggestions:');
+ if (lint.suggestion_count() != 0) {
+ console.log("Suggestions:");
- for (let sug of lint.suggestions()) {
- console.log(
- '\t - ',
- sug.kind() == 1 ? 'Remove' : 'Replace with',
- sug.get_replacement_text()
- );
- }
- }
- }
+ for (let sug of lint.suggestions()) {
+ console.log(
+ "\t - ",
+ sug.kind() == 1 ? "Remove" : "Replace with",
+ sug.get_replacement_text(),
+ );
+ }
+ }
+ }
}
main();