# Text Cleanup Patterns for Todoist Context Bridge [[Introducing Todoist Context Bridge|Todoist Context Bridge]] provides powerful text cleanup capabilities to ensure your Todoist tasks remain clean and focused. These patterns are applied when syncing tasks from Obsidian to Todoist. ## Default Cleanup Patterns When enabled, the following patterns are automatically removed: | Pattern Type | Example | Regex Pattern | | ---------------- | --------------------- | ----------------------------------------- | | Checkboxes | `- [ ] Task` | `^[\s-]*\[[ x?/-]\]` | | Callouts, Quotes | `> - [ ] Task` | `^[\s]*>[\s]*(?:\[!.*?\])?[\s]*>?[\s]*` | | Timestamps | `📝 2024-11-23T22:09` | `📝\s*\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2})?` | | Block IDs | `^abc123` | `\^[a-zA-Z0-9-]+
| | Tags | `#project` | `#[^\s]+` | | Emojis | `📅 ✅` | Unicode emoji ranges | ## Dataview Cleanup Remove Dataview metadata fields from your tasks: 1. **Built-in Handling**: - Due date fields (e.g., `[due::2024-01-01]`) - Priority fields (e.g., `[p::1]`) 2. **Custom Fields**: - Add your own Dataview keys to remove - Multiple keys supported (comma-separated) - Example: If you use `[category::work]`, `[created::2024-01-01]` and `[c::#tag]`, add `category, created, c` to remove it ## Tasks Plugin Cleanup Remove Tasks plugin markers and their associated text when syncing tasks to Todoist. 1. **Default Handling**: - `📅,➕,⏳,🛫,✅,❌,🔺,⏫,🔼,🔽,⏬,🔁,🏁,🆔,⛔` 2. **Supported Markers**: - Date Markers**: - 📅 Due date - ➕ Creation date - ⏳ Scheduled date - 🛫 Start date - ✅ Done date - ❌ Cancelled date - Priority Markers: - 🔺 Highest priority - ⏫ High priority - 🔼 Medium priority - 🔽 Low priority - ⏬ Lowest priority - Other Markers: - 🔁 Recurrence - 🏁 Task completion behavior - 🆔 Task ID - ⛔ Task blocking ### How Cleanup Works When an emoji from your cleanup patterns is found in a task: 1. The emoji itself is removed 2. Any text following the emoji (until the next emoji or end of line) is removed 3. This process repeats for all emojis in your cleanup patterns ## Moment.js Format Cleanup Remove timestamps with optional prefixes using [[Moment.js Format]]: 1. **Pattern Format**: - Uses Moment.js date format tokens - Optional text in square brackets - Multiple patterns supported (comma-separated) 2. **Common Examples**: - Basic timestamp: `YYYY-MM-DD` (matches `2024-01-01`) - With time: `YYYY-MM-DDTHH:mm` (matches `2024-01-01T10:30`) - With prefix: `[📝 ]YYYY-MM-DD` (matches `📝 2024-01-01`) - Multiple prefixes: `[📝 ]YYYY-MM-DDTHH:mm, [❎ ]YYYY-MM-DDTHH:mm` 3. **Tips**: - Square brackets `[]` match literal text - Use `T` as literal time separator - Common tokens: `YYYY` (year), `MM` (month), `DD` (day), `HH` (24h), `mm` (minutes) ## Custom Cleanup Patterns Add your own regex patterns to handle specific cleanup needs: 1. **Pattern Format**: - One pattern per line - Uses JavaScript regex syntax - Applied with global and unicode flags 2. **Common Examples**: - Remove date stamps: `\[\d{4}-\d{2}-\d{2}\]` (matches `[2024-01-01]`) - Remove list markers: `^- ` (matches leading hyphens) - Remove parentheses: `\([^)]*\)` (matches `(any text)`) 3. **Tips**: - Test patterns on [regex101.com](https://regex101.com/) with JavaScript flavor - Patterns are cumulative with default patterns when enabled - Use `^` for start of line, `
for end of line