From 242bc2c1a5959cdb4e6dfe2c4cd551c60f9ab00d Mon Sep 17 00:00:00 2001 From: hafiz Date: Fri, 5 Jul 2019 18:18:06 -0500 Subject: [PATCH 1/2] feat: add crystal as supported language --- src/embedme.lib.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/embedme.lib.ts b/src/embedme.lib.ts index 54413db..559dc90 100644 --- a/src/embedme.lib.ts +++ b/src/embedme.lib.ts @@ -67,6 +67,7 @@ enum SupportedFileType { RUBY = 'rb', KOTLIN = 'kotlin', SCALA = 'scala', + CRYSTAL = 'cr', } enum CommentFamily { @@ -103,6 +104,7 @@ const languageMap: Record = { SupportedFileType.SHELL, SupportedFileType.YAML, SupportedFileType.RUBY, + SupportedFileType.CRYSTAL, ], }; From 505964c3c8c67633a8562ee2b5e1ee3ac67b897d Mon Sep 17 00:00:00 2001 From: ayazhafiz Date: Fri, 5 Jul 2019 20:24:39 -0500 Subject: [PATCH 2/2] fixup! feat: add crystal as supported language --- README.md | 3 ++- test/fixture.md | 9 +++++++++ test/sample.cr | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 test/sample.cr diff --git a/README.md b/README.md index 17b7845..035e278 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Here's a list of file types supported by this utility, if you have a need for an contribute, it is easy! ```ts -// src/embedme.lib.ts#L44-L70 +// src/embedme.lib.ts#L44-L71 enum SupportedFileType { PLAIN_TEXT = 'txt', @@ -106,6 +106,7 @@ enum SupportedFileType { RUBY = 'rb', KOTLIN = 'kotlin', SCALA = 'scala', + CRYSTAL = 'cr', } ``` diff --git a/test/fixture.md b/test/fixture.md index c3790e8..29295f0 100644 --- a/test/fixture.md +++ b/test/fixture.md @@ -257,6 +257,15 @@ puts 'Hello, world!' ``` +Ruby + +```cr +# sample.cr + +puts 'Hello, world!' + +``` + Kotlin ```kotlin diff --git a/test/sample.cr b/test/sample.cr new file mode 100644 index 0000000..5351f08 --- /dev/null +++ b/test/sample.cr @@ -0,0 +1 @@ +puts 'Hello, world!'