lint: ExportHtml.js

This commit is contained in:
John McLear 2021-02-21 20:14:14 +00:00 committed by Richard Hansen
parent 5718c8b360
commit d2359be08b

View file

@ -75,7 +75,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => {
if (authorColors) { if (authorColors) {
css += '<style>\n'; css += '<style>\n';
for (const a in apool.numToAttrib) { for (const a of Object.keys(apool.numToAttrib)) {
const attr = apool.numToAttrib[a]; const attr = apool.numToAttrib[a];
// skip non author attributes // skip non author attributes
@ -106,7 +106,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => {
// this pad, and if yes puts its attrib id->props value into anumMap // this pad, and if yes puts its attrib id->props value into anumMap
props.forEach((propName, i) => { props.forEach((propName, i) => {
let attrib = [propName, true]; let attrib = [propName, true];
if (_.isArray(propName)) { if (Array.isArray(propName)) {
// propName can be in the form of ['color', 'red'], // propName can be in the form of ['color', 'red'],
// see hook exportHtmlAdditionalTagsWithData // see hook exportHtmlAdditionalTagsWithData
attrib = propName; attrib = propName;
@ -135,7 +135,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => {
// we are not insterested on properties in the form of ['color', 'red'], // we are not insterested on properties in the form of ['color', 'red'],
// see hook exportHtmlAdditionalTagsWithData // see hook exportHtmlAdditionalTagsWithData
if (_.isArray(property)) { if (Array.isArray(property)) {
return false; return false;
} }
@ -154,7 +154,7 @@ const getHTMLFromAtext = async (pad, atext, authorColors) => {
// data attributes // data attributes
const isSpanWithData = (i) => { const isSpanWithData = (i) => {
const property = props[i]; const property = props[i];
return _.isArray(property); return Array.isArray(property);
}; };
const emitOpenTag = (i) => { const emitOpenTag = (i) => {