MCPcopy Create free account
hub / github.com/cnodejs/nodeclub / _DoCodeBlocksBefore

Function _DoCodeBlocksBefore

public/libs/showdown.js:957–969  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

955}
956
957var _DoCodeBlocksBefore = function (text) {
958 //
959 // mk2: support code block
960 // ```javascript
961 // console.log('markdown');
962 // ```
963 text = text.replace(/```(\w*\n*)((.|\n)*?)```/g,
964 function (wholeMatch, prepadding, codeblock) {
965 return '```' + prepadding + _EncodeCode(codeblock).replace(/^\s+|\s+$/g, '') + '```';
966 }
967 );
968 return text;
969}
970
971var _DoCodeBlocks = function(text) {
972//

Callers 1

showdown.jsFile · 0.85

Calls 1

_EncodeCodeFunction · 0.70

Tested by

no test coverage detected