--- HTML entities lookup table(s) for `markview.nvim`.
---
--- Sources:
---    • [freeformatter.com](https://www.freeformatter.com/html-entities.html)
---    • [symbl.cc](https://symbl.cc/en/html-entities/)
---
--- `lynx --dump` was used to get the text values from the sites
--- and a few *macros* were used to turn them into lua tables.
---
--- Note: Table keys were later sorted using `vim.inspect()` &
--- I/O functions.
local entities = {};

--- Map for entity name & entity value.
---@type { [string]: string }
entities.names = {
	AElig = "Æ",
	Aacute = "Á",
	Abreve = "Ă",
	Acirc = "Â",
	Agrave = "À",
	Alpha = "Α",
	Amacr = "Ā",
	Aogon = "Ą",
	Aring = "Å",
	Atilde = "Ã",
	Auml = "Ä",
	Beta = "Β",
	Cacute = "Ć",
	Cap = "⋒",
	Ccaron = "Č",
	Ccedil = "Ç",
	Ccirc = "Ĉ",
	Cconint = "∰",
	Cdot = "Ċ",
	Cfr = "ℭ",
	Chi = "Χ",
	Colon = "∷",
	Conint = "∯",
	Copf = "ℂ",
	Cup = "⋓",
	DD = "ⅅ",
	DDotrahd = "⤑",
	Dagger = "‡",
	Dcaron = "Ď",
	Delta = "Δ",
	DownArrowBar = "⤓",
	DownLeftRightVector = "⥐",
	DownLeftTeeVector = "⥞",
	DownLeftVectorBar = "⥖",
	DownRightTeeVector = "⥟",
	DownRightVectorBar = "⥗",
	Dstrok = "Đ",
	ENG = "Ŋ",
	ETH = "Ð",
	Eacute = "É",
	Ecaron = "Ě",
	Ecirc = "Ê",
	Edot = "Ė",
	Egrave = "È",
	Emacr = "Ē",
	Eogon = "Ę",
	Epsilon = "Ε",
	Escr = "ℰ",
	Eta = "Η",
	Euml = "Ë",
	Fscr = "ℱ",
	Gamma = "Γ",
	Gbreve = "Ğ",
	Gcedil = "Ģ",
	Gcirc = "Ĝ",
	Gdot = "Ġ",
	Gg = "⋙",
	Gt = "≫",
	Hat = "^",
	Hcirc = "Ĥ",
	Hfr = "ℌ",
	Hopf = "ℍ",
	Hstrok = "Ħ",
	IJlig = "Ĳ",
	Idot = "İ",
	Imacr = "Ī",
	Int = "∬",
	Iogon = "Į",
	Iota = "Ι",
	Iscr = "ℐ",
	Itilde = "Ĩ",
	Jcirc = "Ĵ",
	Kappa = "Κ",
	Kcedil = "Ķ",
	Lacute = "Ĺ",
	Lambda = "Λ",
	Lcaron = "Ľ",
	Lcedil = "Ļ",
	Lcirc = "Î",
	LeftDownTeeVector = "⥡",
	LeftDownVectorBar = "⥙",
	LeftTeeVector = "⥚",
	LeftUpDownVector = "⥑",
	LeftUpTeeVector = "⥠",
	LeftUpVectorBar = "⥘",
	LeftVectorBar = "⥒",
	Lgrave = "Ì",
	Ll = "⋘",
	Lmidot = "Ŀ",
	Lscr = "ℒ",
	Lstrok = "Ł",
	Lt = "≪",
	Luml = "Ï",
	Map = "⤅",
	Mscr = "ℳ",
	Mu = "Μ",
	Nacute = "Ń",
	Ncaron = "Ň",
	Ncedil = "Ņ",
	Nopf = "ℕ",
	NotCupCap = "≭",
	Ntilde = "Ñ",
	Nu = "Ν",
	OElig = "Œ",
	Oacute = "Ó",
	Ocirc = "Ô",
	Odblac = "Ő",
	Ograve = "Ò",
	Omacr = "Ō",
	Omega = "Ω",
	Omicron = "Ο",
	Oslash = "Ø",
	Otilde = "Õ",
	Ouml = "Ö",
	Phi = "Φ",
	Pi = "Π",
	Popf = "ℙ",
	Prime = "″",
	Psi = "Ψ",
	Qopf = "ℚ",
	RBarr = "⤐",
	Racute = "Ŕ",
	Rarrtl = "⤖",
	Rcaron = "Ř",
	Rcedil = "Ŗ",
	Rho = "Ρ",
	RightDownTeeVector = "⥝",
	RightDownVectorBar = "⥕",
	RightTeeVector = "⥛",
	RightUpDownVector = "⥏",
	RightUpTeeVector = "⥜",
	RightUpVectorBar = "⥔",
	RightVectorBar = "⥓",
	Ropf = "ℝ",
	RoundImplies = "⥰",
	Rscr = "ℛ",
	Sacute = "Ś",
	Scaron = "Š",
	Scedil = "Ş",
	Scirc = "Ŝ",
	Sigma = "Σ",
	Star = "⋆",
	Sub = "⋐",
	Sup = "⋑",
	THORN = "Þ",
	Tau = "Τ",
	Tcaron = "Ť",
	Tcedil = "Ţ",
	Theta = "Θ",
	Tstrok = "Ŧ",
	Uacute = "Ú",
	Uarrocir = "⥉",
	Ubreve = "Ŭ",
	Ucirc = "Û",
	Udblac = "Ű",
	Ugrave = "Ù",
	Umacr = "Ū",
	Uogon = "Ų",
	UpArrowBar = "⤒",
	Upsilon = "Υ",
	Uring = "Ů",
	Utilde = "Ũ",
	Uuml = "Ü",
	VDash = "⊫",
	Vdash = "⊩",
	Vert = "‖",
	VerticalSeparator = "❘",
	Vvdash = "⊪",
	Wcirc = "Ŵ",
	Xi = "Ξ",
	Yacute = "Ý",
	Ycirc = "Ŷ",
	Yuml = "Ÿ",
	Zacute = "Ź",
	Zcaron = "Ž",
	Zdot = "Ż",
	Zeta = "Ζ",
	Zfr = "ℨ",
	Zopf = "ℤ",
	aacute = "á",
	abreve = "ă",
	ac = "∾",
	acd = "∿",
	acirc = "â",
	acute = "´",
	aelig = "æ",
	agrave = "à",
	alefsym = "ℵ",
	alpha = "α",
	amacr = "ā",
	amp = "&",
	["and"] = "∧",
	ang = "∠",
	angmsd = "∡",
	angrt = "∟",
	angrtvb = "⊾",
	anhsph = "∢",
	aogon = "ą",
	apid = "≋",
	apos = "'",
	approxeq = "≊",
	aring = "å",
	ast = "*",
	asymp = "≈",
	asympeq = "≍",
	atilde = "ã",
	auml = "ä",
	awconint = "∳",
	barvee = "⊽",
	bcong = "≌",
	bdquo = "„",
	because = "∵",
	bernou = "ℬ",
	beta = "β",
	beth = "ℶ",
	between = "≬",
	bowtie = "⋈",
	bprime = "‵",
	brvbar = "¦",
	bsemi = "⁏",
	bsim = "∽",
	bsime = "⋍",
	bsol = "\\",
	bull = "•",
	bump = "≎",
	bumpe = "≏",
	cacute = "ć",
	cap = "∩",
	caret = "⁁",
	ccaron = "č",
	ccedil = "ç",
	ccirc = "ĉ",
	cdot = "ċ",
	cedil = "¸",
	cent = "¢",
	check = "✓",
	chi = "χ",
	circ = "ˆ",
	cire = "≗",
	clubs = "♣",
	colon = ":",
	colone = "≔",
	comma = ",",
	commat = "@",
	comp = "∁",
	compfn = "∘",
	cong = "≅",
	conint = "∮",
	coprod = "∐",
	copy = "©",
	copysr = "℗",
	crarr = "↵",
	cross = "✗",
	ctdot = "⋯",
	cudarrl = "⤸",
	cuepr = "⋞",
	cuesc = "⋟",
	cularrp = "⤽",
	cup = "∪",
	cupdot = "⊍",
	curarrm = "⤼",
	curren = "¤",
	cuvee = "⋎",
	cuwed = "⋏",
	cwconint = "∲",
	cwint = "∱",
	dArr = "⇓",
	dHar = "⥥",
	dagger = "†",
	daleth = "ℸ",
	darr = "↓",
	dashv = "⊣",
	dcaron = "ď",
	dd = "ⅆ",
	ddarr = "⇊",
	deg = "°",
	delta = "δ",
	dfisht = "⥿",
	dharl = "⇃",
	dharr = "⇂",
	diamond = "⋄",
	diams = "♦",
	disin = "⋲",
	divide = "÷",
	divonx = "⋇",
	dollar = "$",
	dstrok = "đ",
	dtdot = "⋱",
	duarr = "⇵",
	duhar = "⥯",
	dzigrarr = "⟿",
	eDot = "≑",
	eacute = "é",
	ecaron = "ě",
	ecir = "≖",
	ecirc = "ê",
	ecolon = "≕",
	edot = "ė",
	ee = "ⅇ",
	efDot = "≒",
	egrave = "è",
	ell = "ℓ",
	emacr = "ē",
	empty = "∅",
	eng = "ŋ",
	eogon = "ę",
	epar = "⋕",
	epsilon = "ε",
	equals = "=",
	equest = "≟",
	equiv = "≡",
	erDot = "≓",
	erarr = "⥱",
	escr = "ℯ",
	esdot = "≐",
	esim = "≂",
	eta = "η",
	eth = "ð",
	euml = "ë",
	euro = "€",
	excl = "!",
	exist = "∃",
	female = "♀",
	flat = "♭",
	fnof = "ƒ",
	forall = "∀",
	fork = "⋔",
	frac12 = "½",
	frac13 = "⅓",
	frac14 = "¼",
	frac15 = "⅕",
	frac16 = "⅙",
	frac18 = "⅛",
	frac23 = "⅔",
	frac25 = "⅖",
	frac34 = "¾",
	frac35 = "⅗",
	frac38 = "⅜",
	frac45 = "⅘",
	frac56 = "⅚",
	frac58 = "⅝",
	frac78 = "⅞",
	frasl = "⁄",
	gE = "≧",
	gamma = "γ",
	gbreve = "ğ",
	gcirc = "ĝ",
	gdot = "ġ",
	ge = "≥",
	gel = "⋛",
	gimel = "ℷ",
	gl = "≷",
	gnE = "≩",
	gnsim = "⋧",
	grave = "`",
	gscr = "ℊ",
	gsim = "≳",
	gt = ">",
	gtdot = "⋗",
	gtrarr = "⥸",
	hArr = "⇔",
	hamilt = "ℋ",
	harr = "↔",
	harrcir = "⥈",
	hcirc = "ĥ",
	hearts = "♥",
	hellip = "…",
	hercon = "⊹",
	hoarr = "⇿",
	homtht = "∻",
	horbar = "―",
	hstrok = "ħ",
	hybull = "⁃",
	hyphen = "‐",
	iacute = "í",
	icirc = "î",
	iexcl = "¡",
	igrave = "ì",
	ii = "ⅈ",
	iiint = "∭",
	iiota = "℩",
	ijlig = "ĳ",
	imacr = "ī",
	image = "ℑ",
	imath = "ı",
	imof = "⊷",
	incare = "℅",
	infin = "∞",
	int = "∫",
	intcal = "⊺",
	iogon = "į",
	iota = "ι",
	iquest = "¿",
	isin = "∈",
	isinE = "⋹",
	isindot = "⋵",
	isins = "⋴",
	isinsv = "⋳",
	itilde = "ĩ",
	iuml = "ï",
	jcirc = "ĵ",
	kappa = "κ",
	kcedil = "ķ",
	kgreen = "ĸ",
	lAarr = "⇚",
	lArr = "⇐",
	lAtail = "⤛",
	lBarr = "⤎",
	lE = "≦",
	lHar = "⥢",
	lacute = "ĺ",
	lambda = "λ",
	lang = "〈",
	laquo = "«",
	larr = "←",
	larrb = "⇤",
	larrbfs = "⤟",
	larrfs = "⤝",
	larrpl = "⤹",
	larrsim = "⥳",
	latail = "⤙",
	lbarr = "⤌",
	lbbrk = "❲",
	lbrace = "{",
	lbrack = "[",
	lcaron = "ľ",
	lcedil = "ļ",
	lceil = "⌈",
	ldca = "⤶",
	ldquo = "“",
	ldrdhar = "⥧",
	ldrushar = "⥋",
	le = "≤",
	leg = "⋚",
	lfisht = "⥼",
	lfloor = "⌊",
	lg = "≶",
	lhard = "↽",
	lharu = "↼",
	lharul = "⥪",
	llarr = "⇇",
	llhard = "⥫",
	lmidot = "ŀ",
	lnE = "≨",
	lnsim = "⋦",
	loarr = "⇽",
	lowast = "∗",
	lowbar = "_",
	loz = "◊",
	lpar = "(",
	lrarr = "⇆",
	lrhar = "⇋",
	lrhard = "⥭",
	lrtri = "⊿",
	lsaquo = "‹",
	lsim = "≲",
	lsquo = "‘",
	lstrok = "ł",
	lt = "<",
	ltdot = "⋖",
	lthree = "⋋",
	ltimes = "⋉",
	ltlarr = "⥶",
	ltrie = "⊴",
	lurdshar = "⥊",
	luruhar = "⥦",
	mDDot = "∺",
	macr = "¯",
	male = "♂",
	malt = "✠",
	mdash = "—",
	mho = "℧",
	micro = "µ",
	mid = "∣",
	middot = "·",
	minus = "−",
	minusb = "⊟",
	minusd = "∸",
	mnplus = "∓",
	models = "⊧",
	mu = "μ",
	mumap = "⊸",
	nVDash = "⊯",
	nVdash = "⊮",
	nabla = "∇",
	nacute = "ń",
	nap = "≉",
	napos = "ŉ",
	natural = "♮",
	nbsp = " ",
	ncaron = "ň",
	ncedil = "ņ",
	ncong = "≇",
	ndash = "–",
	ne = "≠",
	neArr = "⇗",
	nearhk = "⤤",
	nequiv = "≢",
	nesear = "⤨",
	nexist = "∄",
	nge = "≱",
	ngsim = "≵",
	ngt = "≯",
	nhArr = "⇎",
	ni = "∋",
	nis = "⋼",
	nisd = "⋺",
	nlArr = "⇍",
	nldr = "‥",
	nle = "≰",
	nlsim = "≴",
	nlt = "≮",
	nltri = "⋪",
	nltrie = "⋬",
	nmid = "∤",
	["not"] = "¬",
	notin = "∉",
	notinvb = "⋷",
	notinvc = "⋶",
	notni = "∌",
	notnivb = "⋾",
	notnivc = "⋽",
	npar = "∦",
	npr = "⊀",
	nprcue = "⋠",
	nrArr = "⇏",
	nrtri = "⋫",
	nrtrie = "⋭",
	nsc = "⊁",
	nsccue = "⋡",
	nsim = "≁",
	nsime = "≄",
	nsqsube = "⋢",
	nsqsupe = "⋣",
	nsub = "⊄",
	nsube = "⊈",
	nsup = "⊅",
	nsupe = "⊉",
	ntgl = "≹",
	ntilde = "ñ",
	ntlg = "≸",
	nu = "ν",
	num = "#",
	numero = "№",
	nvDash = "⊭",
	nvHarr = "⤄",
	nvdash = "⊬",
	nvlArr = "⤂",
	nvrArr = "⤃",
	nwArr = "⇖",
	nwarhk = "⤣",
	nwnear = "⤧",
	oacute = "ó",
	oast = "⊛",
	ocir = "⊚",
	ocirc = "ô",
	odash = "⊝",
	odblac = "ő",
	odot = "⊙",
	oelig = "œ",
	ograve = "ò",
	olarr = "↺",
	oline = "‾",
	omacr = "ō",
	omega = "ω",
	omicron = "ο",
	ominus = "⊖",
	oplus = "⊕",
	["or"] = "∨",
	orarr = "↻",
	ordf = "ª",
	ordm = "º",
	origof = "⊶",
	oscr = "ℴ",
	oslash = "ø",
	osol = "⊘",
	otilde = "õ",
	otimes = "⊗",
	ouml = "ö",
	para = "¶",
	parallel = "∥",
	part = "∂",
	percnt = "%",
	period = ".",
	permil = "‰",
	perp = "⊥",
	pertenk = "‱",
	phi = "φ",
	phone = "󰘂 ",
	pi = "π",
	piv = "ϖ",
	planck = "ℏ",
	planckh = "ℎ",
	plus = "+",
	plusb = "⊞",
	plusdo = "∔",
	plusmn = "±",
	pound = "£",
	pr = "≺",
	prcue = "≼",
	prime = "′",
	prnsim = "⋨",
	prod = "∏",
	prop = "∝",
	prsim = "≾",
	prurel = "⊰",
	psi = "ψ",
	qprime = "⁗",
	quest = "?",
	quot = '"',
	rAarr = "⇛",
	rArr = "⇒",
	rAtail = "⤜",
	rBarr = "⤏",
	rHar = "⥤",
	racute = "ŕ",
	radic = "√",
	rang = "〉",
	raquo = "»",
	rarr = "→",
	rarrap = "⥵",
	rarrb = "⇥",
	rarrbfs = "⤠",
	rarrfs = "⤞",
	rarrpl = "⥅",
	rarrsim = "⥴",
	ratail = "⤚",
	ratio = "∶",
	rbarr = "⤍",
	rbbrk = "❳",
	rbrace = "}",
	rbrack = "]",
	rcaron = "ř",
	rcedil = "ŗ",
	rceil = "⌉",
	rdca = "⤷",
	rdldhar = "⥩",
	rdquo = "”",
	real = "ℜ",
	reg = "®",
	rfisht = "⥽",
	rfloor = "⌋",
	rhard = "⇁",
	rharu = "⇀",
	rharul = "⥬",
	rho = "ρ",
	rlarr = "⇄",
	rlhar = "⇌",
	roarr = "⇾",
	rpar = ")",
	rrarr = "⇉",
	rsaquo = "›",
	rsquo = "’",
	rthree = "⋌",
	rtimes = "⋊",
	rtrie = "⊵",
	ruluhar = "⥨",
	rx = "℞",
	sacute = "ś",
	sbquo = "‚",
	sc = "≻",
	scaron = "š",
	sccue = "≽",
	scedil = "ş",
	scirc = "ŝ",
	scnsim = "⋩",
	scsim = "≿",
	sdot = "⋅",
	sdotb = "⊡",
	seArr = "⇘",
	searhk = "⤥",
	sect = "§",
	semi = ";",
	seswar = "⤩",
	setminus = "∖",
	sext = "✶",
	sharp = "♯",
	shy = "-",
	sigma = "σ",
	sigmaf = "ς",
	sim = "∼",
	sime = "≃",
	simne = "≆",
	simrarr = "⥲",
	sol = "/",
	spades = "♠",
	sqcap = "⊓",
	sqcup = "⊔",
	sqsub = "⊏",
	sqsube = "⊑",
	sqsup = "⊐",
	sqsupe = "⊒",
	star = "☆",
	starf = "★",
	sub = "⊂",
	sube = "⊆",
	subne = "⊊",
	subrarr = "⥹",
	sum = "∑",
	sung = "♪",
	sup = "⊃",
	sup1 = "¹",
	sup2 = "²",
	sup3 = "³",
	supe = "⊇",
	suplarr = "⥻",
	supne = "⊋",
	swArr = "⇙",
	swarhk = "⤦",
	swnwar = "⤪",
	szlig = "ß",
	tau = "τ",
	tcaron = "ť",
	tcedil = "ţ",
	there4 = "∴",
	theta = "θ",
	thetasym = "ϑ",
	thorn = "þ",
	tilde = "˜",
	times = "×",
	timesb = "⊠",
	top = "⊤",
	tprime = "‴",
	trade = "™",
	trie = "≜",
	tstrok = "ŧ",
	uArr = "⇑",
	uHar = "⥣",
	uacute = "ú",
	uarr = "↑",
	ubreve = "ŭ",
	ucirc = "û",
	udarr = "⇅",
	udblac = "ű",
	udhar = "⥮",
	ufisht = "⥾",
	ugrave = "ù",
	uharl = "↿",
	uharr = "↾",
	umacr = "ū",
	uml = "¨",
	uogon = "ų",
	uplus = "⊎",
	upsih = "ϒ",
	upsilon = "υ",
	uring = "ů",
	utdot = "⋰",
	utilde = "ũ",
	uuarr = "⇈",
	uuml = "ü",
	vArr = "⇕",
	vDash = "⊨",
	vdash = "⊢",
	veebar = "⊻",
	veeeq = "≚",
	vellip = "⋮",
	vert = "|",
	vltri = "⊲",
	vrtri = "⊳",
	wcirc = "ŵ",
	wedgeq = "≙",
	weierp = "℘",
	wreath = "≀",
	xcap = "⋂",
	xcup = "⋃",
	xhArr = "⟺",
	xharr = "⟷",
	xi = "ξ",
	xlArr = "⟸",
	xlarr = "⟵",
	xmap = "⟼",
	xnis = "⋻",
	xrArr = "⟹",
	xrarr = "⟶",
	xvee = "⋁",
	xwedge = "⋀",
	yacute = "ý",
	ycirc = "ŷ",
	yen = "¥",
	yuml = "ÿ",
	zacute = "ź",
	zcaron = "ž",
	zdot = "ż",
	zeta = "ζ",
	ziglarr = "⇜",
	zigrarr = "⇝"
};

--- Checks for missing entities.
---@return boolean
---@return string[]
entities.check = function ()
	local _inv = {};

	for name, val in pairs(entities.names) do
		if not val then
			table.insert(_inv, name);
		end
	end

	return vim.tbl_isempty(_inv), _inv;
end

--- Gets an entity from it's number/name.
---@param val string
---@return string?
entities.get = function (val)
	if tonumber(val) then
		return vim.fn.nr2char(tonumber(val));
	elseif entities.names[val] then
		return entities.names[val];
	end
end

return entities;
--- vim:foldmethod=indent:
