1) Create a "Glossary" vocabulary, add two terms "C" and "C++".
2) Configure the input format:
- set match type to "word"
- set term indicator to "superscript" or "icon"
3) Create a new story:
- adds some random text that contains the "C++" word
--> glossary generates 2 links Ci++i one for "C" and another for "C++" that "overlaps" the first one
repeating the previous steps using "Cxx" instead of "C++" works fine, which illustrates that the algorithm fails to view "C++" as a single word
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | glossary.module | 25.18 KB | joglin |
Comments
Comment #1
joglin commentedI have resolved the problem.
I have changed to the technique of search and replacement of the filter.
step 1: synonyms and terms form one single tidy list
step 2: the candidates in the text are attempted roughly
step 3: the search is refined and inserts links
The performances are similar to the native filter. Because some operations come only executed if
necessary (e.g the text for the link is created alone if the match is corrected)
I attach modified glossary.module 4.7.0 - 10/04/2006
Comment #2
nancydruhttp://drupal.org/node/7261
BTW, it is much better to provide a patch (diff) file rather than the whole module.