Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filters by regexp #372

Open
aspell-helper opened this issue Jun 16, 2006 · 1 comment
Open

Filters by regexp #372

aspell-helper opened this issue Jun 16, 2006 · 1 comment

Comments

@aspell-helper
Copy link
Collaborator

Mitraotor <mitraotor@sf> created a feature request on 2006-06-16 10:05:42 UTC
(Orig. from https://sourceforge.net/p/aspell/feature-requests/48)

Good day.

Thank you for aspell's developing!

Spellchecking of some special file formats is hard to
novices. Let's view on PHP file:
------

<html_tag attrib="Value to spellcheck (3)">Text to
spellcheck (4)
... and so on ...
------
How to spellcheck regions (1)-(4) selectively in any
combinations? E.g. PHP comments and HTML text? Or
ignore PHP code completely?

I've failed to force exclude PHP by:
------
MODE php
FILTER context
OPTION clear-context-delimiters
OPTION add-context-delimiters
OPTION add-context-delimiters " "
OPTION disable-context-visible-first
------

It would be great aspell woulda allows filters
configuration via regexp.

And following filter options are highly desirable:
- allowed context (e.g. "" = only in PHP)
- disallowed context (e.g. "" = exclude PHP)
- allowed chars (e.g. to check latin only)
- disallowed chars (e.g. to ignore latin)
- allowed word patterns
- disallowed word patterns (e.g. to ignore hex numbers)
- pre-spelling string/regex replaces (e.g. to
reconstruct hyphenated words)

My apologies, if any of this has been already
implemented, but filter options aren't documented
enough.

@reitzig
Copy link

reitzig commented Apr 30, 2020

Yes, please.

I'm trying to spellcheck AsciiDoc. The suggestion is implement a "straight-forward" filter implementation; looking at the Markdown filter, I see 1k+ lines of C++. Nope.

For my (limited) use case, I only need to imitate the effect of

sed -e '/\.\.\.\./,/\.\.\.\./d' -e 's/`+.\++`//g' file

to get rid of code blocks; maybe a couple similar patterns will come along. It would be great if aspell could consume a similar list of replacement/ignore patterns.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants