#48 Filters by regexp

open
nobody
None
5
2006-06-16
2006-06-16
Mitraotor
No

Good day.

Thank you for aspell's developing!

Spellchecking of some special file formats is hard to
novices. Let's view on PHP file:
---<BOF>---
<?
php_code_to_ignore;
// Comment to spellcheck (1)
echo "Literal to spellcheck (2)";
?>
<html_tag attrib="Value to spellcheck (3)">Text to
spellcheck (4)
... and so on ...
---<EOF>---
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:
---<BOF>---
MODE php
FILTER context
OPTION clear-context-delimiters
OPTION add-context-delimiters <? ?>
OPTION add-context-delimiters " "
OPTION disable-context-visible-first
---<EOF>---

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.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks