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

syntax.add({
	name = "MD5 Checksums",
	shortname = "MD5",
	author = "liqube",

	extensions = { "md5" },

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

		-- Checksum line with binary marker
		{
			pattern = "([%da-fA-F]+)(%s+%*)",
			type = { "hex", "operator" },
			line_start = true,
		},

		-- Checksum line with plain separator
		{
			pattern = "([%da-fA-F]+)(%s+)",
			type = { "hex", "normal" },
			line_start = true,
		},
	},
})
