Skip to content

Commit

Permalink
fix: 删除段落的错误
Browse files Browse the repository at this point in the history
  • Loading branch information
14790897 committed Feb 13, 2024
1 parent c4d4100 commit 089a7af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/GetPubMed .tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async function fetchPubMedData(query: string, year: number, limit: number) {
}
} catch (error) {
//这里无法起作用因为pubmed不会返回400系错误
throw new Error(`未搜索到文献: ${error}`);
throw new Error(`pubmed: ${error}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion utils/others/quillutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function removeParagraphWithReference(
if (startIndex === -1) {
return htmlString;
}
const paragraphTag = "<p><br></p>";
const paragraphTag = "</p><p>";
// 向前找到<p><br></p>作为段落的开始标志
let startParagraphIndex = htmlString.lastIndexOf(paragraphTag, startIndex);
if (startParagraphIndex !== -1) {
Expand Down

0 comments on commit 089a7af

Please sign in to comment.