MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / codeBlock

Function codeBlock

plugins/grok-theme/index.mjs:1416–1431  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

1414 .replace(/&lt;/g, '<')
1415 .replace(/&gt;/g, '>')
1416 .replace(/\\_/g, '_')
1417 .replace(/\\{/g, '{')
1418 .replace(/\\}/g, '}')
1419 .replace(/``.*?``|(?<!\\)`/g, (match) =>
1420 match.startsWith('``') ? match : ''
1421 )
1422 .replace(/`` /g, '')
1423 .replace(/ ``/g, '')
1424 .replace(/\\`/g, '`')
1425 .replace(/\\\*/g, '*')
1426 .replace(/\\\|/g, '|')
1427 .replace(/\\\]/g, ']')
1428 .replace(/\\\[/g, '[')
1429 .replace(/\[([^[\]]*)\]\((.*?)\)/gm, '$1');
1430}
1431
1432function codeBlock(content) {
1433 const trimLastLine = (content) => {
1434 const lines = content.split('\n');

Callers 2

constructorMethod · 0.85
getReturnTypeFunction · 0.85

Calls 2

trimLastLineFunction · 0.85
unEscapeCharsFunction · 0.85

Tested by

no test coverage detected