MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / url

Function url

packages/ast/parse/linen/spec-helpers/index.js:41–49  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

39}
40
41function url(value) {
42 if (value.startsWith('[') && value.endsWith(')')) {
43 const title = value.substring(1, value.indexOf(']'));
44 const url = value.substring(value.indexOf('(') + 1, value.lastIndexOf(')'));
45 return { type: 'url', url, value: url, source: value, title: title };
46 }
47 const [url, title] = value.split('|');
48 return { type: 'url', url, value: url, source: value, title: title || url };
49}
50
51function quote(children) {
52 return {

Callers 2

index.spec.jsFile · 0.50
env.tsFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected