Skip to content

Commit

Permalink
shortened core_replace_multiple() to core_replace()
Browse files Browse the repository at this point in the history
  • Loading branch information
honzi committed Nov 13, 2024
1 parent 5c7b800 commit 2f52e62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ function core_html(args){
}

function core_html_format(string){
return core_replace_multiple({
return core_replace({
'patterns': {
'&': '&',
'<': '&lt;',
Expand Down Expand Up @@ -1092,7 +1092,7 @@ function core_random_string(args){
}

// Required args: patterns, string
function core_replace_multiple(args){
function core_replace(args){
let string_value = args['string'];
for(const pattern in args['patterns']){
string_value = string_value.replace(
Expand Down
2 changes: 1 addition & 1 deletion js/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function test_run(args){
const args_object = {};
for(const arg in test_args['args']){
if(core_type(test_args['args'][arg]) === 'function'){
args_object[arg] = core_replace_multiple({
args_object[arg] = core_replace({
'patterns': {
'\n': '<br>',
},
Expand Down

0 comments on commit 2f52e62

Please sign in to comment.