diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-03-10 22:49:39 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-03-10 22:49:39 +0100 |
commit | 546d3a9994d9f365f75e55f2f22601dc4941f5d5 (patch) | |
tree | a01027133c05b3e2fb39b081c814613a35909397 /inc/common.php | |
parent | 68c26e6d2ab4feaf957863bcf5ba379036c014d3 (diff) | |
download | rpg-546d3a9994d9f365f75e55f2f22601dc4941f5d5.tar.gz rpg-546d3a9994d9f365f75e55f2f22601dc4941f5d5.tar.bz2 |
another change in highlight handling
Now higlighting phrases are passed as an array which then is quoted correctly
when used in a regexp. This should make phrase highlighting work completely
correct.
Please everyone test it.
darcs-hash:20080310214939-7ad00-1abefb02dde40edeead50b4fa5c866c46b95ca3a.gz
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/inc/common.php b/inc/common.php index 7f550dbde..127276475 100644 --- a/inc/common.php +++ b/inc/common.php @@ -1197,6 +1197,11 @@ function php_to_byte($v){ return $ret; } - +/** + * Wrapper around preg_quote adding the default delimiter + */ +function preg_quote_cb($string){ + return preg_quote($string,'/'); +} //Setup VIM: ex: et ts=2 enc=utf-8 : |