MCPcopy Create free account
hub / github.com/github/docs / getLiquidDataReferences

Function getLiquidDataReferences

lib/get-liquid-data-references.js:5–11  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

3// It finds all references matching {{site.data.*}} and return an array of them
4
5export default function getLiquidDataReferences(text) {
6 return (text.match(patterns.dataReference) || []).map((ref) => {
7 const cleaned = ref.replace(/\.+\//g, '').replace('{% data', '').replace('%}', '').trim()
8
9 return `site.data.${cleaned}`
10 })
11}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected