Skip to content

Commit

Permalink
Format files using JuliaFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
terasakisatoshi committed Dec 22, 2024
1 parent 890c81c commit 8b190db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/DocstringAsImage.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ macro imgdoc(s::Symbol)
r = REPL.find_readme(m)
if isnothing(r)
error(
"Sorry, currently, DocstringAsImage does not support the" * " @doc " * string(m) *
"Sorry, currently, DocstringAsImage does not support the" *
" @doc " *
string(m) *
" because it has not docstring nor README.md.",
)
else
Expand All @@ -61,10 +63,10 @@ function imgreadme(m::Module)
readme = basename(REPL.find_readme(m))
try
imgs = mktempdir() do d
cp(pkgdir(m), joinpath(d), force=true, follow_symlinks=true)
cp(pkgdir(m), joinpath(d), force = true, follow_symlinks = true)
readme = joinpath(d, readme)
IOCapture.capture() do
chmod(joinpath(d), 0o700, recursive=true)
chmod(joinpath(d), 0o700, recursive = true)
run(`$(quarto()) render $(readme) --to typst --metadata keep-typ:true`)
typpath = first(splitext(readme)) * ".typ"
@assert isfile(typpath)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ using JET
end

@testset "JET" begin
JET.report_package(DocstringAsImage, target_defined_modules=true)
JET.report_package(DocstringAsImage, target_defined_modules = true)
end

0 comments on commit 8b190db

Please sign in to comment.