1
0
Fork 0

[string] string_replace -> el_string_replace

This commit is contained in:
Witold Filipczyk 2023-07-01 19:40:24 +02:00
parent d03273db63
commit d783cf4add
7 changed files with 7 additions and 7 deletions

View File

@ -126,7 +126,7 @@ try_exmode_exec(struct session *ses, const char *val)
return;
}
add_to_string(&inp, val);
string_replace(&res, &inp, &what, &replace);
el_string_replace(&res, &inp, &what, &replace);
next = res.source;
while (1) {

View File

@ -164,7 +164,7 @@ render_gemini_document(struct cache_entry *cached, struct document *document,
|| !strncmp(line.source + len - 3, "```", 3))) {
preformat = !preformat;
repl = preformat ? &pre_start : &pre_end;
string_replace(&html, &line, &gem_pre, repl);
el_string_replace(&html, &line, &gem_pre, repl);
} else if (preformat) {
add_string_to_string(&html, &line);
add_char_to_string(&html, '\n');

View File

@ -912,7 +912,7 @@ mjs_document_replace(js_State *J)
struct string nu_str;
if (init_string(&nu_str)) {
string_replace(&nu_str, &f_data, &needle, &heystack);
el_string_replace(&nu_str, &f_data, &needle, &heystack);
delete_entry_content(cached);
/* TBD: somehow better rerender the document
* now it's places on the session level in doc_loading_callback */

View File

@ -1001,7 +1001,7 @@ js_document_replace(JSContext *ctx, JSValueConst this_val, int argc, JSValueCons
struct string nu_str;
if (init_string(&nu_str)) {
string_replace(&nu_str, &f_data, &needle, &heystack);
el_string_replace(&nu_str, &f_data, &needle, &heystack);
delete_entry_content(cached);
/* TBD: somehow better rerender the document
* now it's places on the session level in doc_loading_callback */

View File

@ -1299,7 +1299,7 @@ document_replace(JSContext *ctx, unsigned int argc, JS::Value *vp)
struct string nu_str;
if (init_string(&nu_str)) {
string_replace(&nu_str, &f_data, &needle, &heystack);
el_string_replace(&nu_str, &f_data, &needle, &heystack);
delete_entry_content(cached);
/* TBD: somehow better rerender the document
* now it's places on the session level in doc_loading_callback */

View File

@ -545,7 +545,7 @@ add_format_to_string(struct string *string, const char *format, ...)
}
void
string_replace(struct string *res, struct string *inp, struct string *what, struct string *repl)
el_string_replace(struct string *res, struct string *inp, struct string *what, struct string *repl)
{
struct string tmp;
struct string tmp2;

View File

@ -317,7 +317,7 @@ struct string *add_to_ecmascript_string_list(LIST_OF(struct ecmascript_string_li
void free_ecmascript_string_list(LIST_OF(struct ecmascript_string_list_item) *list);
void string_replace(struct string *res, struct string *inp, struct string *what, struct string *repl);
void el_string_replace(struct string *res, struct string *inp, struct string *what, struct string *repl);
/** Returns an empty C string or @a str if different from NULL. */