Template:Category/Guide/ slug
Tiny helper: takes a page name as positional arg 1 and returns a
mermaid-safe slug by replacing spaces, slashes, and colons with
underscores (chained #replace).
Why this lives as its own template:
Mermaid IDs can't contain spaces, slashes, or colons. The natural way
to write the slugification inline inside Template:Category/Guide/edge's
#arraymap formula is a triple-nested #replace —
but nested ParserFunctions don't reliably evaluate inside #arraymap's
formula or value (they get treated as literal text and the inner pipes
get split by the array delimiter, leaving raw {{#replace:...}}
markers in the output). Pushing the chain into a sub-template invocation
sidesteps this: {{#replace:{{#replace:{{#replace:...|:|_}}|/|_}}| |_}} is a template
call, which does evaluate per-iteration inside #arraymap's
formula.
Underscore-prefix on the name signals this is an internal helper for the Category/Guide rendering pipeline, not something other templates should call directly.