Background
scripts/notion-translate/translateFrontMatter.ts defines its own inline regex for detecting data-URL placeholder paths:
```ts
// line ~50
//images/data_url_placeholder\d+_.png/
```
A DATA_URL_PLACEHOLDER_REGEX constant already exists elsewhere in the codebase. These two definitions can drift apart silently.
What to do
- Import and reuse the existing
DATA_URL_PLACEHOLDER_REGEX constant in translateFrontMatter.ts (or move the canonical definition to constants.ts if it isn't there already)
- Remove the inline duplicate regex
- Add a test or comment that makes the single-source-of-truth relationship explicit
Background
scripts/notion-translate/translateFrontMatter.tsdefines its own inline regex for detecting data-URL placeholder paths:```ts
// line ~50
//images/data_url_placeholder\d+_.png/
```
A
DATA_URL_PLACEHOLDER_REGEXconstant already exists elsewhere in the codebase. These two definitions can drift apart silently.What to do
DATA_URL_PLACEHOLDER_REGEXconstant intranslateFrontMatter.ts(or move the canonical definition toconstants.tsif it isn't there already)