diff --git a/Sources/Runestone/Documentation.docc/GettingStarted.md b/Sources/Runestone/Documentation.docc/GettingStarted.md index e1d1e574a..1b4f5ede6 100644 --- a/Sources/Runestone/Documentation.docc/GettingStarted.md +++ b/Sources/Runestone/Documentation.docc/GettingStarted.md @@ -63,7 +63,7 @@ You can set the language, theme, and text on your text view using the appropriat Assuming you have added a language to your app using the [TreeSitterLanguages](https://github.com/simonbs/TreeSitterLanguages) packages, you can create an instance of as shown below. If you have manually added a language to your app, then refer to for information on how to set the state of your text view. ```swift -DispatchQueue.global(qos: .userInitiated) { +DispatchQueue.global(qos: .userInitiated).async { // Initialize of TextViewState on a background queue to due avoid blocking the main thread. let text = "let foo = \"Hello World\"" let state = TextViewState(text: text, theme: ColorfulTheme(), language: .javaScript)