Commit graph mdgrep/tests/test_markdown.py
Author SHA1 Message Date
dschlueter
d9f81ac918 feat: markdown dialect option, faster search (0.1.1)
- split_markdown/load_markdown: dialect="commonmark"|"python-markdown" so list
  blocks match the HTML structure of the renderer (list after paragraph needs a
  blank line; nesting needs 4 spaces in Python-Markdown)
- SearchEngine caches the searched text per block on load
- regex timeout only for /regex/ terms (words and phrases are linear);
  typical queries over 26k blocks: ~30-140 ms instead of 250-700 ms

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:37:40 +02:00
dschlueter
9c7b7e81f9 feat: mdgrep 0.1.0 – boolean full-text search for Markdown
- query language: substrings, phrases, /regex/, AND/OR/NOT (+ UND/ODER/NICHT),
  parentheses; case-insensitive; ReDoS protection via regex timeouts;
  syntax errors with stable code and position
- SearchEngine over in-memory blocks: filters, predicate, grouping, sorting,
  paging, time budget, automatic reload, highlighted snippets
- Markdown loader with split modes file/heading/list/paragraph
- grep-like CLI (mdgrep), JSON output, grep exit codes
- Flask blueprint/app with JSON API and widget assets, dev server
- framework-free JS widget: live search, URL state, filters, paging,
  syntax help, en/de labels, CSS custom properties for theming

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 19:29:44 +02:00