Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Nov 28, 2023
1 parent 815f5f5 commit 679384b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/translate.R
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,10 @@ translate_part <- function(xml, glossary_id, source_lang, target_lang, formality
purrr::walk(nested_parents, untangle_text)

## Unprotect square brackets ----
squaries <- xml2::xml_find_all(woolish$body, ".//d1:squary")
squaries <- c(
xml2::xml_find_all(woolish$body, ".//d1:squary"),
xml2::xml_find_all(woolish$body, ".//squary")
)
purrr::walk(squaries, unprotect_squary)
nested_text_nodes <- xml2::xml_find_all(woolish$body, ".//d1:text/d1:text")
nested_parents <- xml2::xml_parent(nested_text_nodes)
Expand Down

0 comments on commit 679384b

Please sign in to comment.