@@ -194,7 +194,7 @@ func TestFormatRPCMessageMarkdown(t *testing.T) {
194194 PayloadSize : 50 ,
195195 Payload : `{"jsonrpc":"2.0","method":"tools/list","params":{}}` ,
196196 },
197- want : []string {"**github**→`tools/list`" , "~~~ " , `"params"` , "{}" },
197+ want : []string {"**github**→`tools/list`" , "```json " , `"params"` , "{}" },
198198 notWant : []string {`"jsonrpc"` , `"method"` },
199199 },
200200 {
@@ -206,7 +206,7 @@ func TestFormatRPCMessageMarkdown(t *testing.T) {
206206 PayloadSize : 100 ,
207207 Payload : `{"result":{}}` ,
208208 },
209- want : []string {"**github**←resp" , "~~~ " , `"result"` },
209+ want : []string {"**github**←` resp` " , "```json " , `"result"` },
210210 notWant : []string {`"jsonrpc"` , `"method"` },
211211 },
212212 {
@@ -218,7 +218,7 @@ func TestFormatRPCMessageMarkdown(t *testing.T) {
218218 PayloadSize : 100 ,
219219 Error : "Connection timeout" ,
220220 },
221- want : []string {"**github**←resp" , "⚠️`Connection timeout`" },
221+ want : []string {"**github**←` resp` " , "⚠️`Connection timeout`" },
222222 notWant : []string {},
223223 },
224224 {
@@ -232,7 +232,7 @@ func TestFormatRPCMessageMarkdown(t *testing.T) {
232232 Payload : `{invalid json syntax}` ,
233233 },
234234 want : []string {"**github**→`tools/call`" , "`{invalid json syntax}`" },
235- notWant : []string {"~~~ " }, // Should NOT use code blocks for invalid JSON
235+ notWant : []string {"```json " }, // Should NOT use code blocks for invalid JSON
236236 },
237237 {
238238 name : "request with only params null after field removal" ,
@@ -245,7 +245,7 @@ func TestFormatRPCMessageMarkdown(t *testing.T) {
245245 Payload : `{"jsonrpc":"2.0","method":"tools/list","params":null}` ,
246246 },
247247 want : []string {"**github**→`tools/list`" },
248- notWant : []string {"~~~ " , `"params"` }, // Should NOT show JSON block when only params: null
248+ notWant : []string {"```json " , `"params"` }, // Should NOT show JSON block when only params: null
249249 },
250250 {
251251 name : "request with empty object after field removal" ,
@@ -258,7 +258,7 @@ func TestFormatRPCMessageMarkdown(t *testing.T) {
258258 Payload : `{"jsonrpc":"2.0","method":"tools/list"}` ,
259259 },
260260 want : []string {"**github**→`tools/list`" },
261- notWant : []string {"~~~ " }, // Should NOT show JSON block when empty
261+ notWant : []string {"```json " }, // Should NOT show JSON block when empty
262262 },
263263 }
264264
@@ -475,7 +475,7 @@ func TestLogRPCResponse(t *testing.T) {
475475 }
476476
477477 mdStr := string (mdContent )
478- expectedInMd := []string {"**github**←resp" , "⚠️`backend connection failed`" }
478+ expectedInMd := []string {"**github**←` resp` " , "⚠️`backend connection failed`" }
479479 for _ , expected := range expectedInMd {
480480 if ! strings .Contains (mdStr , expected ) {
481481 t .Errorf ("Markdown log does not contain %q" , expected )
0 commit comments