From a0e5884ee5236e517a125aa86a3fe83bd4bc8405 Mon Sep 17 00:00:00 2001 From: Nathan Angelo Cruz <74848327+NateCross@users.noreply.github.com> Date: Mon, 22 May 2023 10:21:48 +0800 Subject: [PATCH] Add dart support (#236) --- examples/code_blocks.md | 10 ++++++++++ internal/code/languages.go | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/examples/code_blocks.md b/examples/code_blocks.md index b73352c..7c95309 100644 --- a/examples/code_blocks.md +++ b/examples/code_blocks.md @@ -21,6 +21,7 @@ Currently supported languages: * `java` * `cpp` * `swift` +* `dart` --- @@ -163,3 +164,12 @@ int main() { ```swift print("Hello, world!") ``` + +--- + +### Dart +```dart +void main() { + print("Hello, world!"); +} +``` diff --git a/internal/code/languages.go b/internal/code/languages.go index cf072d6..0311fcf 100644 --- a/internal/code/languages.go +++ b/internal/code/languages.go @@ -31,6 +31,7 @@ const ( Julia = "julia" Cpp = "cpp" Swift = "swift" + Dart = "dart" ) // Languages is a map of supported languages with their extensions and commands @@ -104,4 +105,8 @@ var Languages = map[string]Language{ Extension: "swift", Commands: cmds{{"swift", ""}}, }, + Dart: { + Extension: "dart", + Commands: cmds{{"dart", ""}}, + }, }