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

CommentFileSizeAuthor
#1 glossary.module25.18 KBjoglin

Comments

joglin’s picture

Version: 4.6.x-1.x-dev » 4.7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new25.18 KB

I 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

nancydru’s picture

Status: Needs review » Closed (duplicate)

http://drupal.org/node/7261

BTW, it is much better to provide a patch (diff) file rather than the whole module.