Skip to content

Commit

Permalink
Fix spaces for opq_string and remove initial space in paste_features
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaspons committed Dec 30, 2022
1 parent 9e948fb commit 3863012
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/opq.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ paste_features <- function (key, value, key_pre = "", bind = "=",
match_case = FALSE, value_exact = FALSE) {
if (is.null (value)) {

feature <- paste0 (sprintf (' ["%s"]', key))
feature <- paste0 (sprintf ('["%s"]', key))
} else {

if (length (value) > 1) {
Expand All @@ -219,7 +219,7 @@ paste_features <- function (key, value, key_pre = "", bind = "=",
}
}
feature <- paste0 (sprintf (
' [%s"%s"%s"%s"',
'[%s"%s"%s"%s"',
key_pre, key, bind, value
))
if (!match_case) {
Expand Down Expand Up @@ -840,7 +840,7 @@ opq_string_intern <- function (opq, quiet = TRUE) {
} else {

if (!map_to_area) {
features <- c (sprintf (" %s%s (%s);\n",
features <- c (sprintf (" %s %s (%s);\n",
opq$osm_types, features, opq$bbox)
)
} else {
Expand All @@ -851,7 +851,7 @@ opq_string_intern <- function (opq, quiet = TRUE) {
)
features <- c (
search_area,
sprintf (" %s%s (area.searchArea);\n", opq$osm_types, features)
sprintf (" %s %s (area.searchArea);\n", opq$osm_types, features)
)
}
}
Expand Down

0 comments on commit 3863012

Please sign in to comment.