MCPcopy Create free account
hub / github.com/alibaba/open-code-review / fencedBlock

Function fencedBlock

scripts/github-actions/post-review-comments.js:1614–1620  ·  view source on GitHub ↗
(content, language = "")

Source from the content-addressed store, hash-verified

1612}
1613
1614function fencedBlock(content, language = "") {
1615 const text = String(content || "");
1616 const fence = safeFence(text);
1617 let block = fence + language + "\n" + text;
1618 if (!text.endsWith("\n")) block += "\n";
1619 return block + fence;
1620}
1621
1622function safeFence(content) {
1623 const matches = String(content || "").match(/`+/g) || [];

Callers 4

runPostReviewCommentsFunction · 0.85
formatCommentFunction · 0.85
formatCommentMarkdownFunction · 0.85

Calls 1

safeFenceFunction · 0.85

Tested by 1