Commit graph

5 commits

Author SHA1 Message Date
cc7989067c Fix: Use working regex patterns with str.replace for reliable query block removal
- Replace pattern.sub() with str.replace() for more reliable matching
- Add newline preservation to maintain proper spacing after removal
- Clean up trailing whitespace on all lines
- Normalize file ending with single trailing newline
- Handle all three formats: query-table prefix, collapsed prefix, and standalone

This version has been tested and successfully removes all Task List query blocks
while preserving non-Task-List queries and maintaining proper file formatting.
2026-11-05 07:38:53 -08:00
a5a1c01553 Fix: Handle all query block formats including truncated files without END_QUERY 2026-11-04 14:41:02 -08:00
53547303a8 Simplify pattern to catch all Task/ToDo List query blocks
- Use single pattern matching #+BEGIN_QUERY to #+END_QUERY
- Check for Task/ToDo List title within the block
- Catches all formats without enumerating prefixes
2026-11-04 07:41:25 -08:00
e4202d920a Fix: Catch query blocks with no prefix (just whitespace before #+BEGIN_QUERY) 2026-11-03 20:46:07 -08:00
f1de59394f
Fix Logseq Task List query block pattern (#1)
This PR fixes the regex pattern to handle both query block formats (with/without query-table:: line) and adds a batch processing helper script.

Reviewed-on: #1
Reviewed-by: Daniel McKnight <d_mcknight@noreply.localhost>
Co-authored-by: Hermes Agent <hermes@mcknight.tech>
Co-committed-by: Hermes Agent <hermes@mcknight.tech>
2026-11-03 20:21:27 -08:00