--- SVG image format
-- @module format.svg

local format = require("core.format")

format.register({
	name = "SVG",
	shortname = "SVG",
	kind = "image",
	image_extension = "svg",
	extensions = { "svg" },
	headers = {
		-- Pattern breakdown: allow opening spaces, then require an SVG root tag
		"^%s*<svg[%s>]",
		-- Pattern breakdown: allow an XML declaration and text before the SVG root tag
		"^%s*<%?xml.-<svg[%s>]",
	},
})
