Skip to content

Commit

Permalink
fix generation for unicodeplots - add ansi color support
Browse files Browse the repository at this point in the history
  • Loading branch information
t-bltg committed Jul 9, 2021
1 parent a8748ec commit 513bfc1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ end
@time makedocs(
format = Documenter.HTML(
prettyurls = get(ENV, "CI", nothing) == "true",
assets = ["assets/favicon.ico"]
assets = ["assets/favicon.ico"],
ansicolor = true
),
sitename = "Plots",
authors = "Thomas Breloff",
Expand Down
11 changes: 11 additions & 0 deletions src/PlotDocs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,20 @@ function generate_markdown(pkgname::Symbol; skip = get(Plots._backend_skips, pkg
```@example $pkgname
Plots.reset_defaults() # hide
""")
if pkgname == :unicodeplots
write(md, """
using Logging # hide
Logging.disable_logging(Logging.Warn) # hide
""")
end
for expr in example.exprs
pretty_print_expr(md, expr)
end
if pkgname == :unicodeplots
write(md, """
Plots._show(stdout, MIME("text/plain"), current()) # hide
""")
end
if i in (2, 31)
write(md, "gif(anim, \"anim_$(pkgname)_ex$i.gif\") # hide\n")
end
Expand Down

0 comments on commit 513bfc1

Please sign in to comment.