Skip to content

Commit

Permalink
fix: HTML export wasn't exporting anything.
Browse files Browse the repository at this point in the history
  • Loading branch information
Klafyvel committed Mar 27, 2023
1 parent 4500925 commit 89856eb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name = "Norganic"
uuid = "dfab6fa2-2962-42ba-9a10-aa3aeb79a0e4"
authors = ["Hugo Levy-Falk <klafyvel@klafyvel.me> and contributors"]
version = "0.1.15"
version = "0.1.17"

[deps]
Comonicon = "863f3e99-da2a-4334-8734-de3dacbe5542"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Norg = "64228516-68de-4e23-8112-6940bc1970d1"
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"

[compat]
Comonicon = "1"
Expand Down
15 changes: 14 additions & 1 deletion src/Norganic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Convert Norg to HTML.
function _html(input::IO, output::IO)
s = read(input, String)
res = norg(HTMLTarget(), s)
write(output, s)
write(output, string(res))
end

function _html(input::IO, output::String)
Expand Down Expand Up @@ -71,4 +71,17 @@ Your solvent-free Norg compiler.
"""
@main

using SnoopPrecompile

@precompile_setup begin
output_file = tempname()
input_file = Norg.NORG_SPEC_PATH
@precompile_all_calls begin
# all calls in this block will be precompiled, regardless of whether
# they belong to your package or not (on Julia 1.8 and higher)
html(input=input_file, output=output_file)
json(input=input_file, output=output_file)
end
end

end

0 comments on commit 89856eb

Please sign in to comment.