useless change

This commit is contained in:
2022-02-13 21:04:40 -06:00
parent 84482be886
commit 983f742f0d

View File

@@ -93,9 +93,9 @@ function readHTML(html: string): uniteApiData {
};
//filter down to just ones named "og:..."
metaElems = metaElems.filter((el: cheerio.Element) => el.attribs.property?.startsWith('og:'));
metaElems = metaElems.filter(el => el.attribs.property?.startsWith('og:'));
metaElems.forEach((el: cheerio.Element) => {
metaElems.forEach(el => {
let attr = el.attribs;
if (attr.property === 'og:title') {
@@ -107,7 +107,7 @@ function readHTML(html: string): uniteApiData {
} else if (attr.property === 'og:description') {
//all lines
let lines = attr.content.split('\n').map((l: string) => l.trim()),
let lines = attr.content.split('\n').map(l => l.trim()),
extraLines: string[] = [];
//ensure first line is correct
@@ -162,9 +162,9 @@ function readHTML(html: string): uniteApiData {
lines.shift();
//rest of lines
lines.forEach((line: string) => {
lines.forEach(line => {
let split = line.split(':').map((l: string) => l.trim()),
let split = line.split(':').map(l => l.trim()),
key = split[0].toLowerCase().replace(/[^\w]/g, ''),
value = split[1];