This is a patch for the second issue in http://forums.rptools.net/viewtopic.php ... 69&start=0
The attached patch introduces a new private class SmileyChatTranslationRuleGroup.SmileyTranslationRule which tries to parse chat messages as HTML and replaces smileys only in text elements.
Edit: New patch file
[patch] Chat translation rules
Moderators: dorpond, trevor, Azhrei
[patch] Chat translation rules
- Attachments
-
- maptool.smileyreplaceinhtml.patch.txt
- (4.82 KiB) Downloaded 320 times
Re: [patch] Chat translation rules
I've rewritten the patch in a way that should properly mask roll output from any chat translation functions.
Re: [patch] Chat translation rules
Patch reverted circa SVN rev 5930.
Re: [patch] Chat translation rules
I think I was able to fix the issue with this patch. It had a slightly overzealous regex pattern and modifying it a bit got rid of the reported behaviors. Patch uploaded.
- Attachments
-
- maptool.smileyreplaceinhtml.patch (fixed).txt
- (10.17 KiB) Downloaded 130 times
My stuff for the community:
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Donate to the Mote Project
The Mote Project's G+ community
Mote on Facebook
Fully Customizable Calendar Drop-in
Re: [patch] Chat translation rules
I actually changed the regex used in the XML that was identifying what was a smiley and what wasn't. Instead of using somthing like (:\)|:D) as the regex it now uses \b(:\)|:D)\b. Adding the word boundaries seemed to work in my testing, but I haven't committed this yet as I wanted to look at some of the problem cases and review them first.
But if it turns out to not be enough, then I'll apply this patch and take a look at it.
Thanks!
But if it turns out to not be enough, then I'll apply this patch and take a look at it.
Thanks!