diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2025-03-11 17:43:05 +0100 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2025-03-11 17:43:05 +0100 |
commit | fa937182bc93aa2c6faadda80ea998cdfd479b4e (patch) | |
tree | cba8e16edcccc6fd2932173484ac444cb79abea2 /src/fields/RichTextUtils.ts | |
parent | cf91c46cfec6e3e36b9184764016f9c1b5c997d4 (diff) | |
parent | 04669ffeb163688c7aefd7b5face7998252abdca (diff) |
Merge branch 'master' of https://github.com/brown-dash/Dash-Web into DocCreatorMenu-work
Diffstat (limited to 'src/fields/RichTextUtils.ts')
-rw-r--r-- | src/fields/RichTextUtils.ts | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/fields/RichTextUtils.ts b/src/fields/RichTextUtils.ts index b3534dde7..42dd0d432 100644 --- a/src/fields/RichTextUtils.ts +++ b/src/fields/RichTextUtils.ts @@ -1,8 +1,7 @@ -/* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable no-await-in-loop */ /* eslint-disable no-use-before-define */ import { AssertionError } from 'assert'; -import * as Color from 'color'; +import Color from 'color'; import { docs_v1 as docsV1 } from 'googleapis'; import { Fragment, Mark, Node, Schema } from 'prosemirror-model'; import { sinkListItem } from 'prosemirror-schema-list'; @@ -175,7 +174,6 @@ export namespace RichTextUtils { const indentMap = new Map<ListGroup, BulletPosition[]>(); let globalOffset = 0; const nodes: Node[] = []; - // eslint-disable-next-line no-restricted-syntax for (const element of structured) { if (Array.isArray(element)) { lists.push(element); @@ -374,11 +372,9 @@ export namespace RichTextUtils { const marksToStyle = async (nodes: (Node | null)[]): Promise<docsV1.Schema$Request[]> => { const requests: docsV1.Schema$Request[] = []; let position = 1; - // eslint-disable-next-line no-restricted-syntax for (const node of nodes) { if (node === null) { position += 2; - // eslint-disable-next-line no-continue continue; } const { marks, attrs, nodeSize } = node; @@ -390,9 +386,7 @@ export namespace RichTextUtils { }; let mark: Mark; const markMap = BuildMarkMap(marks); - // eslint-disable-next-line no-restricted-syntax for (const markName of Object.keys(schema.marks)) { - // eslint-disable-next-line no-cond-assign if (ignored.includes(markName) || !(mark = markMap[markName])) { continue; } |