@Pynckels commented on this pull request.


> +     gchar   *executable  = NULL;
+       gchar   *replacement = NULL;
+       gint    line_num     = 0;
+       GRegex  *regex       = NULL;
+       GString *errormsg    = NULL;
+
+       g_return_val_if_fail(doc != NULL    , NULL);
+       g_return_val_if_fail(doc->is_valid  , NULL);
+       g_return_val_if_fail(needles != NULL, NULL);
+       g_return_val_if_fail(src != NULL    , NULL);
+
+       haystack = g_string_new(src);
+       if (haystack == NULL) return NULL;
+
+       /* Reduce "%%%..." to one "%" */
+       regex = g_regex_new("%+", 0, 0, NULL);

I think that keeping %%... leads to apparent strange behavior. e.g. %%efam.c 
versus %%ezam.c

* %%efam.c leads to fam.cam
* **ezam.c leads to zamzam.c

Similar examples can be given for %%%e, %%%%e, ...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/4250#discussion_r2032951268
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/4250/review/2749578...@github.com>

Reply via email to