mirror of https://github.com/zulip/zulip.git
upload: Rename variable `filename_url` to `syntax_to_insert`.
This variable holds the markdown syntax for a file that's to be inserted into a message, hence the new name.
This commit is contained in:
parent
7b7c52b7c9
commit
633d814df9
|
@ -375,15 +375,15 @@ export function setup_upload(config) {
|
||||||
}
|
}
|
||||||
const split_url = url.split("/");
|
const split_url = url.split("/");
|
||||||
const filename = split_url.at(-1);
|
const filename = split_url.at(-1);
|
||||||
const filename_url = "[" + filename + "](" + url + ")";
|
const syntax_to_insert = "[" + filename + "](" + url + ")";
|
||||||
const $text_area = get_item("textarea", config);
|
const $text_area = get_item("textarea", config);
|
||||||
const replacement_successful = compose_ui.replace_syntax(
|
const replacement_successful = compose_ui.replace_syntax(
|
||||||
get_translated_status(file),
|
get_translated_status(file),
|
||||||
filename_url,
|
syntax_to_insert,
|
||||||
$text_area,
|
$text_area,
|
||||||
);
|
);
|
||||||
if (!replacement_successful) {
|
if (!replacement_successful) {
|
||||||
compose_ui.insert_syntax_and_focus(filename_url, $text_area);
|
compose_ui.insert_syntax_and_focus(syntax_to_insert, $text_area);
|
||||||
}
|
}
|
||||||
|
|
||||||
compose_ui.autosize_textarea($text_area);
|
compose_ui.autosize_textarea($text_area);
|
||||||
|
|
Loading…
Reference in New Issue