Skip to content

When formatting IDs, use non-word characters word separators, not only whitespace

Yann Büchau requested to merge nobodyinperson/kbibtex:bugs/kde423976 into master

Hi @thomasfischer,

This is a fix for my suggestion at Bugs/kde423976.

Using non-word characters (\W+) as word separators feels more natural than just whitespace (\s+) as it includes special characters (like -+:. which appear in titles and journal names frequently).

I also enabled unicode support for QRegularExpression so non-ascii characters don't count towards \W. (I was delighted to see that you already normalized() the ID strings 😃)

This small change has the desired effect (compiled like this), producing nice IDs without special characters.

Hope everything is alright like this!

Cheers,

Yann

Merge request reports