Merge pull request #2541 from JuliaPlots/bbs/sani
special case LaTeXStrings in sanitation
This commit is contained in:
commit
ca653c5bec
@ -901,6 +901,15 @@ function pgfx_sanitize_string(s::AbstractString)
|
||||
s = replace(s, r"\\?\%" => "\\%")
|
||||
s = replace(s, r"\\?\_" => "\\_")
|
||||
s = replace(s, r"\\?\&" => "\\&")
|
||||
s = replace(s, r"\\?\{" => "\\{")
|
||||
s = replace(s, r"\\?\}" => "\\}")
|
||||
end
|
||||
@require LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" begin
|
||||
using LaTeXStrings
|
||||
function pgfx_sanitize_string(s::LaTeXString)
|
||||
s = replace(s, r"\\?\#" => "\\#")
|
||||
s = replace(s, r"\\?\%" => "\\%")
|
||||
end
|
||||
end
|
||||
function pgfx_sanitize_plot!(plt)
|
||||
for (key, value) in plt.attr
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user