Skip to content

Commit caa1096

Browse files
Merge pull request #13 from cpbotha/cpb-fix-citations-whitespace
Remove whitespace before first citation
2 parents fa8d39f + 45d35a8 commit caa1096

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,9 @@ class PerplexityServer {
235235
// response.data can have a string[] .citations
236236
// these are referred to in the return text as numbered citations e.g. [1]
237237
const sourcesText = response.data.citations
238-
? `\n## Sources\nPlease keep the numbered citations inline.\n
239-
${response.data.citations
240-
.map((c: string, i: number) => `${i + 1}: ${c}`)
241-
.join("\n")}`
238+
? `\n\n## Sources\nPlease keep the numbered citations inline.\n${response.data.citations
239+
.map((c: string, i: number) => `${i + 1}: ${c}`)
240+
.join("\n")}`
242241
: "";
243242

244243
return {

0 commit comments

Comments
 (0)