diff options
Diffstat (limited to 'src/client/views/pdf')
| -rw-r--r-- | src/client/views/pdf/AnchorMenu.tsx | 2 | ||||
| -rw-r--r-- | src/client/views/pdf/PDFViewer.tsx | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/client/views/pdf/AnchorMenu.tsx b/src/client/views/pdf/AnchorMenu.tsx index e3a968180..b204d3692 100644 --- a/src/client/views/pdf/AnchorMenu.tsx +++ b/src/client/views/pdf/AnchorMenu.tsx @@ -118,7 +118,7 @@ export class AnchorMenu extends AntimodeMenu<AntimodeMenuProps> { transferToFlashcard = (text: string, x: number, y: number) => { // put each question generated by GPT on the front of the flashcard - const senArr = text.trim().split('Question: '); + const senArr = text.trim().split('Question:'); const collectionArr: Doc[] = []; for (let i = 1; i < senArr.length; i++) { const newDoc = Docs.Create.ComparisonDocument(senArr[i], { _layout_isFlashcard: true, _width: 300, _height: 300 }); diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index 18db214c8..358557ad7 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -402,8 +402,6 @@ export class PDFViewer extends ObservableReactComponent<IViewerProps> { const queryText = this._selectionText; this._loading = true; try { - if (this._selectionText === '') { - } const res = await gptAPICall(queryText, GPTCallType.FLASHCARD); AnchorMenu.Instance.transferToFlashcard(res || 'Something went wrong', NumCast(this._props.layoutDoc['x']), NumCast(this._props.layoutDoc['y'])); |
