(dataRef)
| 150 | } |
| 151 | |
| 152 | function checkReusable(dataRef) { |
| 153 | // Get the data filepath from the data reference, |
| 154 | // where the data reference looks like: {% data reusables.foo.bar %} |
| 155 | // and the data filepath looks like: data/reusables/foo/bar.md. |
| 156 | const reusablePath = dataRef |
| 157 | .match(/{% data (.*?) %}/)[1] |
| 158 | .split('.') |
| 159 | // If early access is part of the path, remove it (since the path below already includes it) |
| 160 | .filter((n) => n !== 'early-access') |
| 161 | .join('/') |
| 162 | |
| 163 | // If the reusable file doesn't exist in data/early-access, exclude it |
| 164 | return fs.existsSync(`${path.posix.join(earlyAccessData, reusablePath)}.md`) |
| 165 | } |
| 166 | |
| 167 | function checkImage(imageRef) { |
| 168 | const imagePath = imageRef |
no outgoing calls
no test coverage detected