MCPcopy Index your code
hub / github.com/nodejs/node / outputLink

Function outputLink

test/fixtures/snapshot/marked.js:414–440  ·  view source on GitHub ↗
(cap, link, raw, lexer)

Source from the content-addressed store, hash-verified

412 findClosingBracket = helpers.findClosingBracket;
413
414 function outputLink(cap, link, raw, lexer) {
415 var href = link.href;
416 var title = link.title ? _escape(link.title) : null;
417 var text = cap[1].replace(/\\([\[\]])/g, '$1');
418
419 if (cap[0].charAt(0) !== '!') {
420 lexer.state.inLink = true;
421 var token = {
422 type: 'link',
423 raw: raw,
424 href: href,
425 title: title,
426 text: text,
427 tokens: lexer.inlineTokens(text, [])
428 };
429 lexer.state.inLink = false;
430 return token;
431 } else {
432 return {
433 type: 'image',
434 raw: raw,
435 href: href,
436 title: title,
437 text: _escape(text)
438 };
439 }
440 }
441
442 function indentCodeCompensation(raw, text) {
443 var matchIndentToCode = raw.match(/^(\s+)(?:```)/);

Callers 1

marked.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…