MCPcopy Create free account
hub / github.com/TruthHun/BookStack / linkHref

Function linkHref

static/editor.md/lib/codemirror/mode/markdown/markdown.js:552–565  ·  view source on GitHub ↗
(stream, state)

Source from the content-addressed store, hash-verified

550 }
551
552 function linkHref(stream, state) {
553 // Check if space, and return NULL if so (to avoid marking the space)
554 if(stream.eatSpace()){
555 return null;
556 }
557 var ch = stream.next();
558 if (ch === '(' || ch === '[') {
559 state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
560 if (modeCfg.highlightFormatting) state.formatting = "link-string";
561 state.linkHref = true;
562 return getType(state);
563 }
564 return 'error';
565 }
566
567 function getLinkHrefInside(endChar) {
568 return function(stream, state) {

Callers

nothing calls this directly

Calls 2

getLinkHrefInsideFunction · 0.85
getTypeFunction · 0.70

Tested by

no test coverage detected