Skip to content

Commit d49aff0

Browse files
Copilotdata-douser
andauthored
Fix markdownInlineCode to replace newlines with spaces for single-line output
Replace \r\n, \r, and \n with a space (not just normalize CRLF to LF) so the returned inline code span never contains a literal newline character. Update docstring and test to reflect space-replacement behavior. Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com> Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/87cfd54e-9d66-4871-a581-601aff3c6c8d
1 parent 67d5fe0 commit d49aff0

4 files changed

Lines changed: 13 additions & 10 deletions

File tree

server/dist/codeql-development-mcp-server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64469,7 +64469,7 @@ var SUPPORTED_LANGUAGES = [
6446964469
"swift"
6447064470
];
6447164471
function markdownInlineCode(value) {
64472-
const normalized = value.replace(/\r\n?/g, "\n");
64472+
const normalized = value.replace(/\r\n|\r|\n/g, " ");
6447364473
let maxRun = 0;
6447464474
let currentRun = 0;
6447564475
for (const ch of normalized) {

0 commit comments

Comments
 (0)