Skip to content

Commit db96c2e

Browse files
Fix regex pattern in PdfTextSplitter to exclude additional characters; update feedback state handling in Answer component
1 parent 3fb1910 commit db96c2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/data_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def find_urls(string):
161161
r"(?i)\b("
162162
r"(?:https?://|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)"
163163
r"(?:[^()\s<>]+|\(([^()\s<>]+|(\([^()\s<>]+\)))*\))+"
164-
r"(?:\(([^()\s<>]+|(\([^()\s<>]+\)))*\)|[^()\s`!\[\]{};:'\".,<>?«»“”‘’])"
164+
r"(?:\(([^()\s<>]+|(\([^()\s<>]+\)))*\)|[^()\s`!()\[\]{};:'\".,<>?«»“”‘’])"
165165
r")"
166166
)
167167
urls = re.findall(regex, string)

src/frontend/src/components/Answer/Answer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export const Answer = ({ answer, onCitationClicked }: Props) => {
155155
const onLikeResponseClicked = async () => {
156156
if (answer.message_id == undefined) return
157157

158-
let newFeedbackState: Feedback.Neutral | Feedback.Positive | Feedback.Negative
158+
let newFeedbackState: Feedback.Neutral | Feedback.Positive
159159
// Set or unset the thumbs up state
160160
if (feedbackState == Feedback.Positive) {
161161
newFeedbackState = Feedback.Neutral

0 commit comments

Comments
 (0)