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

format.register({
	name = "SRT Subtitles File",
	shortname = "SRT",
	author = "liqube",
	extensions = "srt",
	headers = "^1",
	
	patterns = {
		{ pattern = "%d%d:%d%d:%d%d%,%d%d%d", type = "symbol", line_start = true },
		{ pattern = "%-%->", type = "symbol" },
		{ pattern = "%d%d:%d%d:%d%d%,%d%d%d", type = "symbol" },
		{ pattern = "[%a_%-]+:%S+", type = "comment" },

		{ pattern = "%d+", type = "number", line_start = true },
	},
	outline_patterns = {
		{ pattern = "%d%d:%d%d:%d%d%,%d%d%d%s+%-%->%s+%d%d:%d%d:%d%d%,%d%d%d", line_start = true },
	},
})
