From cb1dccbb2e1078fd5730fbb15d8efb1cada7ae48 Mon Sep 17 00:00:00 2001 From: Tori Whaley Date: Wed, 14 Jan 2026 16:04:12 -0500 Subject: [PATCH 1/5] Making some QUICK updates to the docs (oops!) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I hope I didn't mess up any links or misplace an image! 😱 --- get-started/exploring-data/dashboards.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get-started/exploring-data/dashboards.mdx b/get-started/exploring-data/dashboards.mdx index 48b29926..c7fc1df6 100644 --- a/get-started/exploring-data/dashboards.mdx +++ b/get-started/exploring-data/dashboards.mdx @@ -21,7 +21,7 @@ On the nav bar, click "New" to create a new dashboard. @@ -252,7 +252,7 @@ Until viewers have set a value for the filter, the dashboard will not run. /> -To learn more about adding filters to your dashboards, check out our guide on [using filters](/guides/limiting-data-using-filters). +To learn more about adding filters to your dashboards, check out our guide on [using filters](/guides/limiting-data-using-filterss). ## Add tabs From bf89d38578f5029fa0819fc5848e07d44e541f01 Mon Sep 17 00:00:00 2001 From: Tori Whaley Date: Wed, 14 Jan 2026 16:22:18 -0500 Subject: [PATCH 2/5] script comment update --- scripts/check-image-locations.js | 20 ++++++++++++++++---- scripts/check-links.js | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/scripts/check-image-locations.js b/scripts/check-image-locations.js index f45fd3bc..bf0aa1e1 100755 --- a/scripts/check-image-locations.js +++ b/scripts/check-image-locations.js @@ -19,9 +19,18 @@ const path = require('path'); const MARKDOWN_IMAGE_REGEX = /!\[([^\]]*)\]\(([^)]+)\)/g; const JSX_IMG_SRC_REGEX = /]+src=["']([^"']+)["']/g; const FRAME_IMG_REGEX = /]*>[\s\S]*?]+src=["']([^"']+)["']/g; +const CODE_BLOCK_REGEX = /```[\s\S]*?```/g; const VALID_IMAGE_EXTENSIONS = ['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp']; +function removeCodeBlocks(content) { + // Replace code blocks with same number of newlines to preserve line numbers + return content.replace(CODE_BLOCK_REGEX, (match) => { + const newlineCount = (match.match(/\n/g) || []).length; + return '\n'.repeat(newlineCount); + }); +} + function findMDXFiles(dir, fileList = []) { const files = fs.readdirSync(dir); @@ -42,28 +51,31 @@ function findMDXFiles(dir, fileList = []) { function extractImageReferences(content, filePath) { const images = []; + // Remove code blocks to avoid flagging example images in documentation + const contentWithoutCodeBlocks = removeCodeBlocks(content); + // Extract markdown images: ![alt](path) let match; - while ((match = MARKDOWN_IMAGE_REGEX.exec(content)) !== null) { + while ((match = MARKDOWN_IMAGE_REGEX.exec(contentWithoutCodeBlocks)) !== null) { const imagePath = match[2]; if (!imagePath.startsWith('http://') && !imagePath.startsWith('https://')) { images.push({ alt: match[1], path: imagePath, type: 'markdown', - line: content.substring(0, match.index).split('\n').length + line: contentWithoutCodeBlocks.substring(0, match.index).split('\n').length }); } } // Extract JSX image src - while ((match = JSX_IMG_SRC_REGEX.exec(content)) !== null) { + while ((match = JSX_IMG_SRC_REGEX.exec(contentWithoutCodeBlocks)) !== null) { const imagePath = match[1]; if (!imagePath.startsWith('http://') && !imagePath.startsWith('https://')) { images.push({ path: imagePath, type: 'jsx', - line: content.substring(0, match.index).split('\n').length + line: contentWithoutCodeBlocks.substring(0, match.index).split('\n').length }); } } diff --git a/scripts/check-links.js b/scripts/check-links.js index 48a0e5b2..c9b064a3 100644 --- a/scripts/check-links.js +++ b/scripts/check-links.js @@ -13,7 +13,7 @@ const CHECK_EXTERNAL = process.argv.includes('--external'); // Regex patterns for finding links const MARKDOWN_LINK_REGEX = /\[([^\]]+)\]\(([^)]+)\)/g; -const JSX_LINK_REGEX = /(?:href|src)=["']([^"']+)["']/g; +const JSX_LINK_REGEX = /href=["']([^"']+)["']/g; const ANCHOR_REGEX = /#[^)\s"']*/; function findMDXFiles(dir, fileList = []) { From df41482b1558761419826d45cc68ac4b6545c639 Mon Sep 17 00:00:00 2001 From: Tori Whaley Date: Wed, 14 Jan 2026 16:29:14 -0500 Subject: [PATCH 3/5] fix --- get-started/exploring-data/dashboards.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-started/exploring-data/dashboards.mdx b/get-started/exploring-data/dashboards.mdx index c7fc1df6..94a86ec1 100644 --- a/get-started/exploring-data/dashboards.mdx +++ b/get-started/exploring-data/dashboards.mdx @@ -21,7 +21,7 @@ On the nav bar, click "New" to create a new dashboard. From 5d3b5496af4044cc97879e2be5af690b52333631 Mon Sep 17 00:00:00 2001 From: Tori Whaley Date: Wed, 14 Jan 2026 16:29:34 -0500 Subject: [PATCH 4/5] fix --- get-started/exploring-data/dashboards.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-started/exploring-data/dashboards.mdx b/get-started/exploring-data/dashboards.mdx index 94a86ec1..48b29926 100644 --- a/get-started/exploring-data/dashboards.mdx +++ b/get-started/exploring-data/dashboards.mdx @@ -252,7 +252,7 @@ Until viewers have set a value for the filter, the dashboard will not run. /> -To learn more about adding filters to your dashboards, check out our guide on [using filters](/guides/limiting-data-using-filterss). +To learn more about adding filters to your dashboards, check out our guide on [using filters](/guides/limiting-data-using-filters). ## Add tabs From 86d782f75d00821bda4960b8a79363a31425be07 Mon Sep 17 00:00:00 2001 From: Tori Whaley Date: Wed, 14 Jan 2026 16:32:46 -0500 Subject: [PATCH 5/5] better commenting --- scripts/check-links.js | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/check-links.js b/scripts/check-links.js index c9b064a3..ddd5d285 100644 --- a/scripts/check-links.js +++ b/scripts/check-links.js @@ -15,6 +15,14 @@ const CHECK_EXTERNAL = process.argv.includes('--external'); const MARKDOWN_LINK_REGEX = /\[([^\]]+)\]\(([^)]+)\)/g; const JSX_LINK_REGEX = /href=["']([^"']+)["']/g; const ANCHOR_REGEX = /#[^)\s"']*/; +const CODE_BLOCK_REGEX = /```[\s\S]*?```/g; + +function removeCodeBlocks(content) { + return content.replace(CODE_BLOCK_REGEX, (match) => { + const newlineCount = (match.match(/\n/g) || []).length; + return '\n'.repeat(newlineCount); + }); +} function findMDXFiles(dir, fileList = []) { const files = fs.readdirSync(dir); @@ -36,23 +44,26 @@ function findMDXFiles(dir, fileList = []) { function extractLinks(content, filePath) { const links = []; + // Remove code blocks to avoid flagging example links in documentation + const contentWithoutCodeBlocks = removeCodeBlocks(content); + // Extract markdown links: [text](url) let match; - while ((match = MARKDOWN_LINK_REGEX.exec(content)) !== null) { + while ((match = MARKDOWN_LINK_REGEX.exec(contentWithoutCodeBlocks)) !== null) { links.push({ text: match[1], url: match[2], type: 'markdown', - line: content.substring(0, match.index).split('\n').length + line: contentWithoutCodeBlocks.substring(0, match.index).split('\n').length }); } - // Extract JSX links: href="..." or src="..." - while ((match = JSX_LINK_REGEX.exec(content)) !== null) { + // Extract JSX links: href="..." + while ((match = JSX_LINK_REGEX.exec(contentWithoutCodeBlocks)) !== null) { links.push({ url: match[1], type: 'jsx', - line: content.substring(0, match.index).split('\n').length + line: contentWithoutCodeBlocks.substring(0, match.index).split('\n').length }); }