Summary: | having fun with the auto replace feature | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | Frederik Schwarzer <schwarzer> |
Component: | general | Assignee: | Konversation Developers <konversation-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | hein |
Priority: | NOR | ||
Version: | 1.0.1 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
autoreplace patch for regexp commas
allow commas in regexp updater to update the config file for new ordering patch for konversation.upd |
Description
Frederik Schwarzer
2006-12-31 16:07:13 UTC
Created attachment 32606 [details]
autoreplace patch for regexp commas
The config file uses commas to seperate the autoreplace information. (checked,input/output,regexp,url). A comma is valid syntax for regexp so this causes problems. The original code uses .section(',',2,2) to grab the regexp which in the above test case stops at 5. Then it uses .section(',',3) to grab everything after that 3rd comma adding part regexp to the beginning of the url.
The simplest solution I could see is putting the url before the regexp (checked,input/output,url,regexp) since a url will never have a comma (afaik).
BUT: This causes current configurations to flip the regexp and url in the autoreplace configuration menu. After you edit the preferences to fix that however everything works just as it should including for the test case.
Perhaps there's some way to counteract this caveat?
Created attachment 32637 [details]
allow commas in regexp
Oops, I forgot a change. This new patch also changes the order of the default configuration for autoreplace that's created in config/preferences.cpp
Created attachment 32649 [details]
updater to update the config file for new ordering
Created attachment 32650 [details]
patch for konversation.upd
Script and patch are to get konversation.upd to update the config file to be compat. with the new order of the autoreplace info.
Fixed in SVN revision 955466 using the newer patch from bug 153761. |