Skip to content

Commit

Permalink
Merge pull request langchain-ai#23 from langchain-ai/brace/fix-citati…
Browse files Browse the repository at this point in the history
…on-regex

fix citation regex
  • Loading branch information
bracesproul authored Mar 11, 2024
2 parents 0cc55e5 + b8175f6 commit b8149a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/app/components/ChatMessageBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ const createAnswerElements = (
React.SetStateAction<boolean[]>
>,
) => {
const matches = Array.from(content.matchAll(/\[\^?\$?{?(\d+)}?\^?\]/g));
const matches = Array.from(
content.matchAll(/\[\^?\$?{?(\d+)}?\^?\]|\[\$\{(\d+)\}\]/g),
);
const elements: JSX.Element[] = [];
let prevIndex = 0;

Expand Down

0 comments on commit b8149a3

Please sign in to comment.