Fixup format

This commit is contained in:
Belleve Invis 2020-04-12 00:10:12 -07:00
parent 0b1452a3a7
commit e6da99af60
15 changed files with 47 additions and 45 deletions

View file

@ -48,7 +48,7 @@ const ligationSamples = [
arrow("<-->"),
arrow("<--->"),
arrow("<---->"),
htmlComment("<!--"),
htmlComment("<!--")
],
[
arrow2("=<<"),
@ -69,7 +69,7 @@ const ligationSamples = [
arrow("<==>"),
arrow("<===>"),
arrow("<====>"),
htmlComment("<!---"),
htmlComment("<!---")
],
[
arrow("<------"),
@ -91,7 +91,7 @@ const ligationSamples = [
eqeqeq("==="),
exeqeq("!=="),
eqslasheq("=/="),
eqexeq("=!="),
eqexeq("=!=")
],
[
centerOps(":="),
@ -114,8 +114,8 @@ const ligationSamples = [
plusplus("++"),
plusplus("+++"),
logc("|-"),
logc("-|"),
],
logc("-|")
]
];
const ligationSamplesNarrow = [
@ -129,7 +129,7 @@ const ligationSamplesNarrow = [
arrow("->>"),
arrow("-->"),
arrow("--->"),
htmlComment("<!--"),
htmlComment("<!--")
],
[
arrow2("-<<"),
@ -140,7 +140,7 @@ const ligationSamplesNarrow = [
arrow2(">>-"),
arrow("<-->"),
arrow("<--->"),
arrow("<---->"),
arrow("<---->")
],
[
arrow("<=="),
@ -152,7 +152,7 @@ const ligationSamplesNarrow = [
arrow("=>>"),
arrow("==>"),
arrow("===>"),
htmlComment("<!---"),
htmlComment("<!---")
],
[
arrow2("=<<"),
@ -163,7 +163,7 @@ const ligationSamplesNarrow = [
arrow2(">>="),
arrow("<==>"),
arrow("<===>"),
arrow("<====>"),
arrow("<====>")
],
[
arrow("<-------"),
@ -172,7 +172,7 @@ const ligationSamplesNarrow = [
arrow("<~~"),
arrow("<~"),
arrow("~>"),
arrow("~~>"),
arrow("~~>")
],
[
logc("\\/"),
@ -185,7 +185,7 @@ const ligationSamplesNarrow = [
eqeqeq("==="),
exeqeq("!=="),
eqslasheq("=/="),
eqexeq("=!="),
eqexeq("=!=")
],
[
centerOps(":="),
@ -199,7 +199,7 @@ const ligationSamplesNarrow = [
trig("|>"),
centerOps("+:"),
centerOps("-:"),
centerOps("=:"),
centerOps("=:")
],
[
kernDotty("::"),
@ -211,18 +211,18 @@ const ligationSamplesNarrow = [
plusplus("++"),
plusplus("+++"),
logc("|-"),
logc("-|"),
],
logc("-|")
]
];
module.exports = async function getLigationData() {
const ligToml = await fs.readFile(path.join(__dirname, "../../ligation-set.toml"), "utf8");
const ligData = toml.parse(ligToml);
const ligationSets = buildLigationSet(ligData, (comp) => comp.buildup.join(","));
const ligationSets = buildLigationSet(ligData, comp => comp.buildup.join(","));
const nonMergeLigationSets = buildLigationSet(
ligData,
(comp) => comp.tag + comp.buildup.join(",")
comp => comp.tag + comp.buildup.join(",")
);
return {
@ -231,13 +231,13 @@ module.exports = async function getLigationData() {
cherry: ligData.simple,
rawSets: ligData.composite,
sets: [...ligationSets.values()],
nonMergeSets: [...nonMergeLigationSets.values()],
nonMergeSets: [...nonMergeLigationSets.values()]
};
};
function buildLigationSet(ligData, getKey) {
const ligationSets = new Map([
["*off", { tag: "calt", switch: "off", desc: "Ligation Off", brief: "Off", buildup: [] }],
["*off", { tag: "calt", switch: "off", desc: "Ligation Off", brief: "Off", buildup: [] }]
]);
for (const sel in ligData.composite) {
const comp = ligData.composite[sel];
@ -250,7 +250,7 @@ function buildLigationSet(ligData, getKey) {
buildup: comp.buildup,
tagName: comp.tag,
desc: comp.desc,
brief: comp.brief || comp.desc,
brief: comp.brief || comp.desc
};
ligationSets.set(key, item);
} else {

View file

@ -2,7 +2,7 @@ const fs = require("fs-extra");
const path = require("path");
const toml = require("toml");
module.exports = async function() {
module.exports = async function () {
const variantsToml = await fs.readFile(path.join(__dirname, "../../variants.toml"), "utf8");
const variants = toml.parse(variantsToml);

View file

@ -18,7 +18,7 @@ module.exports = async function (charMapPath) {
...(exemplar.auxiliary || []),
...(exemplar.index || []),
...(exemplar.numbers || []),
...(exemplar.punctuation || []),
...(exemplar.punctuation || [])
].join("");
let fullSupport = true;
@ -64,9 +64,9 @@ module.exports = async function (charMapPath) {
return {
stats: {
glyphCount: charMap.length,
codePointCount: rawCoverage.size,
codePointCount: rawCoverage.size
},
unicodeCoverage: gatherCov(rawCoverage),
languages: Array.from(supportLangSet).sort(),
languages: Array.from(supportLangSet).sort()
};
};