Open kimikage opened 4 years ago
Two brief thoughts on the Documenter side of this:
<?xml
declarations on Documenter's side. I don't think we would need to be particularly concerned about the efficiency, or even aim for it being 100% correct all the time.IOContext
convention does arise, then Documenter should definitely adopt it.I believe removing XML declarations is not an urgent task. If we decide to implement it, I'm not sure which layer should do it. (So, I cannot submit the PR immediately.:sweat_smile:)
In case of HTML output format, SVG images can be embedded as outputs of
@example
blocks and so on. However,show(io::IO, ::MIME"image/svg+xml", object)
may write an XML declaration. In most major web browsers, such invalid XML declarations have no effect on the rendering, but they may cause warnings.There are roughly two possible measures:
show
method from printing the XML declarationThe former is a straightforward method, but it is not efficient. The latter is more efficient, but currently there are no interfaces for the suppression. Therefore I suggested defining a new
IOContext
property. (See: https://github.com/JuliaLang/julia/issues/35586)If the latter approach (2.) works, there are two possible strategies.
Any thoughts?