## Filters: Auto non-breaking space filter

filter_vowels
Maintained by Kamil Łuczak
Auto change spaces after chosen vowels and words into non-breaking space - &nbsp; You can specify vowels (letters) and words after wchich space will be changed into non-breaking space.
1 sites
4 fans

This filter automaticly changes space after chosen vowels and words into non-breaking space - &amp;nbsp;

You can specify vowels (letters) and words after wchich space will be changed into non-breaking space in filter settings.

For example paragraph like this:

The quick brown fox jumps over a

lazy dog.

Will be displayed as:

The quick brown fox jumps over

a lazy dog.

Betwen a and lazy will be inserted &nbsp;  =   a&nbsp;lazy

Installation

Install the plugin like any other plugin to folder /filter/vowels

If You're installing with Plugin installer using zip archive choose plugin type: Text filter (filter)

See http://docs.moodle.org/28/en/Installing_plugins for details on installing Moodle plugins

Usage

First, activate the filter_vowels plugin in Site Administration -> Plugins -> Filters -> Manage filters

Settings

filter_vowels has a settings page to allow you to change the filter to only certain letters.

You can also enable function that changes spaces after selected words into hard spaces.

### Contributors

Thanks Kamil for sharing this filter with the Moodle community. I was able to check the basic functionality and do a quick code review. It seems the current version would also process text inside the value of attributes - such as <img src="..." alt="Bolek i Lolek"> - and also, as you mention in a todo comment in the code, in javascript and other places. I am sure you will want to address this is a future update of the filter. Also, let me recommend to add unit tests your filter. You will find them really useful during further development.