[Kde-pim] Highlighting plain-text mails (linklocator)
Julien Richard-Foy
julien.rf at no-log.org
Sun Sep 6 15:52:57 BST 2009
Hi !
I'm back from holidays with another patch for linklocator.cpp.
The previous patch I posted was wrong (I forgot a pair of brackets), this one
is good (I tested it).
It provides highlighting for words containing any kind of letter, including
ones with diacritic (like éàç). It provides also highlighting of several
words : *this text would be highlighted with my patch*. Last, punctuations
marks can now be included in highlighted text : *awesome!*
Todo : it's still not possible to imbricate several highlighting syntax, like
that : _*This text could be bold and underlined*_
I tested my patch without compiling kmail, I just took the linklocator.cpp
file, trimmed KDE-dependant part of the code, then modified the highlihtedText
function and tested it with a small Qt app until ok, then reverted back KDE
things trimmed at the beginning (using diff and patch). I hope everything is
alright.
Julien
PS: I've written a small file used to be a test case (written in french), I
joined it to the mail if you want to use it…
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 852 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20090906/a9d18456/attachment.bin>
-------------- next part --------------
Ce paragraphe _contient_ des mots ou des _groupes de mots_ à mettre en forme…
Ce texte *a l'air* de _fonctionner_, à condition d’utiliser le guillemet ASCII.
Le répertoire /tmp/ contient des données temporaires.
Un répertoire /est/ un *dossier* où on peut mettre des *fichiers*.
Je vais *peut-être* pouvoir commiter mon patch !
Voici un exemple de texte mis en forme *sur
plusieurs lignes*.
Je vais tenter de repérer des faux positif*
Utilise le fichier /dev/null/.
Je dis bien *300 dollars !*
Donc par mois : 300 * 30 = *9000* !
*Ça fait plaisir de pouvoir utiliser des lettres accentuées dans du texte mis en forme*.
_J'aime :_ les *frites.*
*Les frites ?* *French fries?*
*Ouais !* *Yes!*
TODO : (1) Pouvoir _imbriquer des *mises en forme*_.
* un faux positif est un cas où un morceau du texte matche l’expression régulière alors que ce n’est pas le comportement souhaité.
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list