Skip to content

Commit

Permalink
Merge pull request #1661 from olivroy/rm-error
Browse files Browse the repository at this point in the history
Improve error message for `rm_spanners()`, `rm_footnotes()`, and `rm_source_notes()`
  • Loading branch information
rich-iannone authored May 14, 2024
2 parents 18b06ab + fd8c707 commit 6f2ae5e
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 60 deletions.
9 changes: 6 additions & 3 deletions R/tab_remove.R
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ rm_spanners <- function(
as.integer(
resolve_vector_i(
expr = {{ spanners }},
vector = spanners_tbl[["spanner_id"]]
vector = spanners_tbl[["spanner_id"]],
"spanner"
)
)

Expand Down Expand Up @@ -498,7 +499,8 @@ rm_footnotes <- function(
as.integer(
resolve_vector_i(
expr = {{ footnotes }},
vector = as.character(seq_len(footnotes_count))
vector = as.character(seq_len(footnotes_count)),
"footnote"
)
)

Expand Down Expand Up @@ -649,7 +651,8 @@ rm_source_notes <- function(
as.integer(
resolve_vector_i(
expr = {{ source_notes }},
vector = as.character(seq_len(source_notes_length))
vector = as.character(seq_len(source_notes_length)),
"source note"
)
)

Expand Down
Loading

0 comments on commit 6f2ae5e

Please sign in to comment.