Skip to content

Commit

Permalink
adds Nim-related mimetypes back (#23589)
Browse files Browse the repository at this point in the history
ref #23226
  • Loading branch information
ringabout authored May 10, 2024
1 parent 2e3777d commit 1eb9aac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/pure/mimetypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ const mimes* = {
"msty": "application/vnd.muvee.style",
"taglet": "application/vnd.mynfc",
"nlu": "application/vnd.neurolanguage.nlu",
"nim": "text/nim",
"nimble": "text/nimble",
"nimf": "text/nim",
"nims": "text/nim",
"ntf": "application/vnd.nitf",
"nitf": "application/vnd.nitf",
"nnd": "application/vnd.noblenet-directory",
Expand Down
5 changes: 5 additions & 0 deletions tests/stdlib/tmimetypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,10 @@ template main() =
# see also `runnableExamples`.
# xxx we should have a way to avoid duplicating code between runnableExamples and tests

doAssert m.getMimetype("nim") == "text/nim"
doAssert m.getMimetype("nimble") == "text/nimble"
doAssert m.getMimetype("nimf") == "text/nim"
doAssert m.getMimetype("nims") == "text/nim"

static: main()
main()

0 comments on commit 1eb9aac

Please sign in to comment.