Skip to content

Commit b3e8c4f

Browse files
fix(docs): ignore URN-style colons in residual shortcode guard
1 parent e4f7bcd commit b3e8c4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/sanitize-docs-emoji.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ find "$DOCS_DIR" -type f -name '*.mdx' -exec perl -0pi -e '
1717
s/:warning:/⚠️/g;
1818
' {} +
1919

20-
if matches="$(find "$DOCS_DIR" -type f -name '*.mdx' -exec grep -HnE ':[a-z][a-z0-9_+-]*:' {} + || true)" && [[ -n "$matches" ]]; then
20+
if matches="$(find "$DOCS_DIR" -type f -name '*.mdx' -exec grep -HnP '(?<![\w:]):[a-z][a-z0-9_+-]*:(?![\w:])' {} + || true)" && [[ -n "$matches" ]]; then
2121
echo "unmapped emoji shortcodes remain under $DOCS_DIR, add them to this script:" >&2
2222
printf '%s\n' "$matches" >&2
2323
exit 1

0 commit comments

Comments
 (0)