(facts: CodeFacts, language: 'en' | 'de')
| 183 | |
| 184 | /** "In the source:" with the lines as a code block and what did not fit, in the language of the question. */ |
| 185 | export function codeFactsMarkdown(facts: CodeFacts, language: 'en' | 'de'): string { |
| 186 | const words = chatRound3Text[language]; |
| 187 | const mark = facts.lines.some(line => line.includes('```')) ? '~~~' : '```'; |
| 188 | const more = facts.more ? `\n\n${facts.unit === 'members' ? words.moreMembers(facts.more) : words.moreLines(facts.more)}` : ''; |
| 189 | return `${words.inSource}\n\n${mark}${facts.fence}\n${facts.lines.join('\n')}\n${mark}${more}`; |
| 190 | } |
no outgoing calls
no test coverage detected