markup.ml
markup.ml copied to clipboard
Don't pretty-print SVG or MathML
See https://github.com/dmbaturin/soupault/issues/25:
This is arguably an upstream bug. Lambda Soup's (that is, Markup's) pretty-printer is supposedly sensitive to the meaning of elements, and should only insert whitespace where it would have no semantic effect (typically, where there is already whitespace around HTML phrasing content, and anywhere around HTML flow content). It should probably just treat all SVG (and MathML) as opaque, while IIRC it currently applies blind pretty-printing to it instead.
...or have Markup.ml understand SVG and MathML semantics.