1
0
Fork 0

Merge pull request #61 from fabrixxm/master

fix to variable rexexp and mentions autocomplete in comments
This commit is contained in:
Simon 2012-03-02 16:02:02 -08:00
commit d32edf83d3
2 changed files with 11 additions and 2 deletions

View file

@ -160,7 +160,16 @@
private function var_replace($s){
$m = array();
if (preg_match_all('/\$\[{0,1}([a-zA-Z0-9-_]+\.*)+\]{0,1}/', $s,$m)){
/** regexp:
* \$ literal $
* (\[)? optional open square bracket
* ([a-zA-Z0-9-_]+\.?)+ var name, followed by optional
* dot, repeated at least 1 time
* (?(1)\]) if there was opened square bracket
* (subgrup 1), match close bracket
*/
if (preg_match_all('/\$(\[)?([a-zA-Z0-9-_]+\.?)+(?(1)\])/', $s,$m)){
foreach($m[0] as $var){
$varn = str_replace(array("[","]"), array("",""), $var);
$val = $this->_get_var($varn, true);

View file

@ -292,7 +292,7 @@
$('body').css('cursor', 'auto');
}
/* autocomplete @nicknames */
$(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl");
$(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");
});
}