diff --git a/common/languages.ts b/common/languages.ts index 84fd4599..4818f346 100644 --- a/common/languages.ts +++ b/common/languages.ts @@ -8,6 +8,7 @@ import { rust as rustLanguage } from "@codemirror/legacy-modes/mode/rust?externa import { python as pythonLanguage } from "@codemirror/legacy-modes/mode/python?external=@codemirror/language&target=es2022"; import { protobuf as protobufLanguage } from "@codemirror/legacy-modes/mode/protobuf?external=@codemirror/language&target=es2022"; import { shell as shellLanguage } from "@codemirror/legacy-modes/mode/shell?external=@codemirror/language&target=es2022"; +import { swift as swiftLanguage } from "@codemirror/legacy-modes/mode/swift?external=@codemirror/language&target=es2022"; import { toml as tomlLanguage } from "@codemirror/legacy-modes/mode/toml?external=@codemirror/language&target=es2022"; import { xml as xmlLanguage } from "@codemirror/legacy-modes/mode/xml?external=@codemirror/language&target=es2022"; import { json as jsonLanguage } from "@codemirror/legacy-modes/mode/javascript?external=@codemirror/language&target=es2022"; @@ -81,7 +82,7 @@ export const builtinLanguages: Record = { "bash": StreamLanguage.define(shellLanguage), "zsh": StreamLanguage.define(shellLanguage), "fish": StreamLanguage.define(shellLanguage), - "swift": StreamLanguage.define(rustLanguage), + "swift": StreamLanguage.define(swiftLanguage), "toml": StreamLanguage.define(tomlLanguage), "json": StreamLanguage.define(jsonLanguage), "xml": StreamLanguage.define(xmlLanguage), diff --git a/website/Markdown/Syntax Highlighting.md b/website/Markdown/Syntax Highlighting.md index e547c4f2..c0397e41 100644 --- a/website/Markdown/Syntax Highlighting.md +++ b/website/Markdown/Syntax Highlighting.md @@ -34,8 +34,8 @@ fn main() { ``` ```swift -fn myFun() { - +func myFunc() { + print("Hello World!") } ```