Skip to content

Commit

Permalink
Merge pull request #15 from ayazhafiz/patch-1
Browse files Browse the repository at this point in the history
feat: add crystal as supported language
  • Loading branch information
zakhenry authored Jul 8, 2019
2 parents 9b9c258 + 505964c commit a92e9e4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -106,6 +106,7 @@ enum SupportedFileType {
RUBY = 'rb',
KOTLIN = 'kotlin',
SCALA = 'scala',
CRYSTAL = 'cr',
}
```

Expand Down
2 changes: 2 additions & 0 deletions src/embedme.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ enum SupportedFileType {
RUBY = 'rb',
KOTLIN = 'kotlin',
SCALA = 'scala',
CRYSTAL = 'cr',
}

enum CommentFamily {
Expand Down Expand Up @@ -103,6 +104,7 @@ const languageMap: Record<CommentFamily, SupportedFileType[]> = {
SupportedFileType.SHELL,
SupportedFileType.YAML,
SupportedFileType.RUBY,
SupportedFileType.CRYSTAL,
],
};

Expand Down
9 changes: 9 additions & 0 deletions test/fixture.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@ puts 'Hello, world!'

```

Ruby

```cr
# sample.cr
puts 'Hello, world!'
```

Kotlin

```kotlin
Expand Down
1 change: 1 addition & 0 deletions test/sample.cr
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
puts 'Hello, world!'

0 comments on commit a92e9e4

Please sign in to comment.