amake / org_flutter

Org Mode widgets for Flutter
MIT License
17 stars 4 forks source link

Improve search results and highlighting #2

Open amake opened 4 years ago

amake commented 4 years ago

Search queries don’t quite work how you might expect: the pattern (string or regexp) is matched against (and highlighting applied to) each parsed token separately. So queries that one might expect to match will not match because the expected hit straddles multiple tokens.

Example: a string query foo/ bar or regexp query foo.*bar will not match the org content

/foo/ bar

because the tokens ['/', 'foo', '/'], 'bar' are each matched separately.