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

format.register({
	name = "Descript.ion",
	shortname = "D.ion",
	author = "liqube",

	filenames = { "descript.ion" },

	patterns = {
		-- Quoted filename entry
		{
			pattern = "%s*(\"[^\"\r\n]*\")(%s+)",
			type = { "string", "normal" },
			line_start = true,
		},

		-- Unquoted filename entry
		{
			pattern = "%s*([^%s\"\r\n]+)(%s+)",
			type = { "string", "normal" },
			line_start = true,
		},

		-- Total Commander multiline escape
		{ pattern = "\\n", type = "operator" },
	},

	outline_patterns = {
		-- Quoted filename entry
--		{ pattern = "%s*\"[^\"\r\n]*\"%s+", line_start = true },

		-- Unquoted filename entry
--		{ pattern = "%s*[^%s\"\r\n]+%s+", line_start = true },
	},
})
