Skip to content

Commit

Permalink
Add additional metadata to ipynb output
Browse files Browse the repository at this point in the history
Fixes #21, correct syntax highlighting of Julia code blocks.
  • Loading branch information
MichaelHatherly committed Jan 31, 2024
1 parent 973d061 commit 709baa4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/server.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ function evaluate!(
cells = evaluate_raw_cells!(f, raw_chunks, merged_frontmatter; showprogress)
data = (
metadata = (
kernelspec = (
display_name = "Julia $(VERSION)",
language = "julia",
name = "julia-$(VERSION)",
),
kernel_info = (name = "julia",),
language_info = (
name = "julia",
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ end
@test json["metadata"]["language_info"]["version"] == "$VERSION"
@test json["metadata"]["language_info"]["codemirror_mode"] == "julia"
@test json["metadata"]["kernel_info"]["name"] == "julia"
@test startswith(json["metadata"]["kernelspec"]["name"], "julia")
@test startswith(json["metadata"]["kernelspec"]["display_name"], "Julia")
@test json["metadata"]["kernelspec"]["language"] == "julia"
end
tests = let
tests = Dict()
Expand Down

0 comments on commit 709baa4

Please sign in to comment.