MCPcopy Create free account
hub / github.com/Effect-TS/tsgo / GetMermaidBaseURL

Method GetMermaidBaseURL

etscore/options.go:266–279  ·  view source on GitHub ↗

GetMermaidBaseURL resolves the MermaidProvider value to a full base URL. - "" or "mermaid.live" → "https://mermaid.live/edit#" - "mermaid.com" → "https://www.mermaidchart.com/play#" - Any other string → " /edit#"

()

Source from the content-addressed store, hash-verified

264// - "mermaid.com" → "https://www.mermaidchart.com/play#"
265// - Any other string → "<value>/edit#"
266func (e *EffectPluginOptions) GetMermaidBaseURL() string {
267 provider := ""
268 if e != nil {
269 provider = e.MermaidProvider
270 }
271 switch provider {
272 case "", "mermaid.live":
273 return "https://mermaid.live/edit#"
274 case "mermaid.com":
275 return "https://www.mermaidchart.com/play#"
276 default:
277 return provider + "/edit#"
278 }
279}
280
281// GetLayerGraphFollowDepth returns the configured layer graph follow depth, or 0 if not set.
282func (e *EffectPluginOptions) GetLayerGraphFollowDepth() int {

Callers 3

TestGetMermaidBaseURLFunction · 0.95
formatLayerHoverFunction · 0.80

Calls

no outgoing calls

Tested by 2

TestGetMermaidBaseURLFunction · 0.76