-- lx format
local format = require("core.format")

format.register({
	name = "SFV Checksums",
	shortname = "SFV",
	author = "liqube",

	extensions = { "sfv" },

	patterns = {
		-- Comment line
		{ pattern = ";.-\n", type = "comment", line_start = true },

		-- Filename followed by CRC32 checksum
		{
			pattern = "(.-)(%s+)([%da-fA-F][%da-fA-F][%da-fA-F][%da-fA-F][%da-fA-F][%da-fA-F][%da-fA-F][%da-fA-F])",
			type = { "normal", "normal", "hex" },
			line_start = true,
		},
	},
})
