Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/sim/app/llms-full.txt/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ function proseToMarkdown(prose: Prose): string {
/** A fact as a table cell: its compact form, as the comparison table renders it. */
function factCell(fact: Fact | undefined): string {
const value = fact ? (fact.shortValue ?? fact.value) : 'Unknown'
return value.replace(/\|/g, '\\|').replace(/\s*\n\s*/g, ' ')
return value
.replace(/\\/g, '\\\\')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Escaping Fix Lacks Test The new backslash-escaping case has no regression test, and the current comparison facts do not exercise it. A test with a literal backslash immediately before a pipe should check that the output remains a three-column Markdown row; without one, a later change to the escape order could silently bring back the table break this PR fixes.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

.replace(/\|/g, '\\|')
.replace(/\s*\n\s*/g, ' ')
}

function isoDate(date: Date): string {
Expand Down
Loading