File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/frontend/src/components/Answer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,17 +24,17 @@ export const enumerateCitations = (citations: Citation[]) => {
2424export function parseAnswer ( answer : AskResponse ) : ParsedAnswer {
2525 let answerText = answer . answer
2626
27- const CITATION_MARKER_REGEX = / \[ \d + \] / g;
27+ const citationMarkerRegex = / \[ \d + \] / g;
2828 // Early return if no citations available
2929 if ( ! answer . citations ?. length ) {
3030 return {
3131 citations : [ ] ,
32- markdownFormatText : answerText . replace ( CITATION_MARKER_REGEX , '' )
32+ markdownFormatText : answerText . replace ( citationMarkerRegex , '' )
3333 }
3434 }
3535
3636 // Extract unique citation markers and process them
37- const citationMarkers = [ ...new Set ( answerText . match ( CITATION_MARKER_REGEX ) || [ ] ) ]
37+ const citationMarkers = [ ...new Set ( answerText . match ( citationMarkerRegex ) || [ ] ) ]
3838 const processedCitations : Citation [ ] = [ ]
3939
4040 citationMarkers . forEach ( ( marker , index ) => {
You can’t perform that action at this time.
0 commit comments