Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I was doing some testing with the module and ran across a problem related to the regex pattern in the _glossify_to_links function.
The \s+ whitespace match was matching across newlines in my example text which threw an error on line 298 when it came time to create the link, and also prevented it from matching the proper term which followed. replaced it with [^\S\r\n]+ which matches whitespace but not \n or \r and that took care of my problem. I made that change in lines, 261, 262 and 286.
Comments
Comment #1
WorldFallz CreditAttribution: WorldFallz commentedAwesome catch... thanks for posting it. I hope to go through the issue queue this weekend and get an updated release out.
Comment #2
batje CreditAttribution: batje commentedthis issue needs a patch (or a commit) before it can be tested.
Comment #3
WorldFallz CreditAttribution: WorldFallz commentedI'm not sure that this behavior is actually correct. If there is some term with multiple words like "rutrum tempus mattis" and simply by virtue of auto line break it gets split like:
It won't match but I would think for the majority of use cases it should match, no?
Comment #4
WorldFallz CreditAttribution: WorldFallz commentedI'm also unable to reproduce the error message-- it would help a great deal if you included the exact text of the message and what glossify settings you're using as well as any input filters on the text format in question.