aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-03-10 16:23:45 -0400
committerbobzel <zzzman@gmail.com>2025-03-10 16:23:45 -0400
commit7e5ba63c3eb8bf36b3bbb81f46248766a7342d60 (patch)
treed3191da49f81b008f97dead32b3a6459f37539d1
parent88134739073691e0094151722961f85204ccb1af (diff)
fixed compile errors
-rw-r--r--src/client/views/StyleProviderQuiz.tsx7
-rw-r--r--src/server/index.ts2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/client/views/StyleProviderQuiz.tsx b/src/client/views/StyleProviderQuiz.tsx
index bcb4b4ec1..0268771ff 100644
--- a/src/client/views/StyleProviderQuiz.tsx
+++ b/src/client/views/StyleProviderQuiz.tsx
@@ -1,6 +1,5 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Tooltip } from '@mui/material';
-import axios from 'axios';
import * as React from 'react';
import { returnFalse, setupMoveUpEvents } from '../../ClientUtils';
import { emptyFunction } from '../../Utils';
@@ -86,7 +85,7 @@ export namespace styleProviderQuiz {
if (!quizBoxes.length) {
imgBox.Loading = true;
- const response = await Networking.PostToServer('/labels', { file: i ? i : imgBox.paths[0], drag: i ? 'drag' : 'full', smart: quiz });
+ const response = (await Networking.PostToServer('/labels', { file: i ? i : imgBox.paths[0], drag: i ? 'drag' : 'full', smart: quiz })) as { result: string };
const parsedResponse = JSON.parse(response.result.replace(/'/g, '"'));
if (parsedResponse['boxes'].length != 0) {
createBoxes(imgBox, parsedResponse['boxes'], parsedResponse['text']);
@@ -222,8 +221,8 @@ export namespace styleProviderQuiz {
*/
function extractHexAndSentences(inputString: string) {
// Regular expression to match a hexadecimal number at the beginning followed by a period and sentences
- const regex = /^#([0-9A-Fa-f]+)\.\s*(.+)$/s;
- const match = inputString.match(regex);
+ const regex = /^#([0-9A-Fa-f]+)\.\s*(.+)$/;
+ const match = inputString.replace('\n', ' ').match(regex);
if (match) {
const hexNumber = match[1];
diff --git a/src/server/index.ts b/src/server/index.ts
index 3b77359ec..92d2bfa29 100644
--- a/src/server/index.ts
+++ b/src/server/index.ts
@@ -4,7 +4,7 @@ import * as mobileDetect from 'mobile-detect';
import * as path from 'path';
import { logExecution } from './ActionUtilities';
import AssistantManager from './ApiManagers/AssistantManager';
-import FlashcardManager from './ApiManagers/FlashcardManager';
+import FlashcardManager from './ApiManagers/FlashcardManager 2';
import DataVizManager from './ApiManagers/DataVizManager';
import DeleteManager from './ApiManagers/DeleteManager';
import DownloadManager from './ApiManagers/DownloadManager';